License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unix |
Safe Haskell | None |
Language | Haskell98 |
Synopsis
- data PackedObjectInfo hash = PackedObjectInfo {}
- type PackedObjectRaw hash = (PackedObjectInfo hash, ByteString)
- packEnumerate :: HashAlgorithm hash => LocalPath -> IO [Ref hash]
- packOpen :: LocalPath -> Ref hash -> IO FileReader
- packClose :: FileReader -> IO ()
- packReadHeader :: LocalPath -> Ref hash -> IO Word32
- packReadMapAtOffset :: HashAlgorithm hash => FileReader -> Word64 -> (ByteString -> ByteString) -> IO (Maybe (Object hash))
- packReadAtOffset :: HashAlgorithm hash => FileReader -> Word64 -> IO (Maybe (Object hash))
- packReadRawAtOffset :: HashAlgorithm hash => FileReader -> Word64 -> IO (PackedObjectRaw hash)
- packEnumerateObjects :: HashAlgorithm hash => LocalPath -> Ref hash -> Int -> (PackedObjectRaw hash -> IO a) -> IO ()
- packedObjectToObject :: HashAlgorithm hash => (PackedObjectInfo hash, ByteString) -> Maybe (Object hash)
- packObjectFromRaw :: HashAlgorithm hash => (ObjectType, Maybe (ObjectPtr hash), ByteString) -> Maybe (Object hash)
Documentation
data PackedObjectInfo hash Source #
Instances
Eq (PackedObjectInfo hash) Source # | |
Defined in Data.Git.Storage.Pack (==) :: PackedObjectInfo hash -> PackedObjectInfo hash -> Bool # (/=) :: PackedObjectInfo hash -> PackedObjectInfo hash -> Bool # | |
Show (PackedObjectInfo hash) Source # | |
Defined in Data.Git.Storage.Pack showsPrec :: Int -> PackedObjectInfo hash -> ShowS # show :: PackedObjectInfo hash -> String # showList :: [PackedObjectInfo hash] -> ShowS # |
type PackedObjectRaw hash = (PackedObjectInfo hash, ByteString) Source #
Enumerators of packs
packEnumerate :: HashAlgorithm hash => LocalPath -> IO [Ref hash] Source #
Enumerate the pack refs available in this repository.
Helpers to process packs
Command for the content of a pack
packReadHeader :: LocalPath -> Ref hash -> IO Word32 Source #
return the number of entries in this pack
packReadMapAtOffset :: HashAlgorithm hash => FileReader -> Word64 -> (ByteString -> ByteString) -> IO (Maybe (Object hash)) Source #
read an object at a specific position using a map function on the objectData
packReadAtOffset :: HashAlgorithm hash => FileReader -> Word64 -> IO (Maybe (Object hash)) Source #
read an object at a specific position
packReadRawAtOffset :: HashAlgorithm hash => FileReader -> Word64 -> IO (PackedObjectRaw hash) Source #
read a raw representation at a specific position
packEnumerateObjects :: HashAlgorithm hash => LocalPath -> Ref hash -> Int -> (PackedObjectRaw hash -> IO a) -> IO () Source #
enumerate all objects in this pack and callback to f for reach raw objects
turn a packed object into a
packedObjectToObject :: HashAlgorithm hash => (PackedObjectInfo hash, ByteString) -> Maybe (Object hash) Source #
packObjectFromRaw :: HashAlgorithm hash => (ObjectType, Maybe (ObjectPtr hash), ByteString) -> Maybe (Object hash) Source #