Portability | unix |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Safe Haskell | None |
- data Delta = Delta Word64 Word64 [DeltaCmd]
- data DeltaCmd
- deltaParse :: Parser ByteString Delta
- deltaRead :: ByteString -> Maybe Delta
- deltaApply :: ByteString -> Delta -> ByteString
Documentation
a delta is a source size, a destination size and a list of delta cmd
possible commands in a delta
deltaParse :: Parser ByteString DeltaSource
parse a delta. format is 2 variable sizes, followed by delta cmds. for each cmd: * if first byte MSB is set, we copy from source. * otherwise, we copy from delta. * extensions are not handled.
deltaRead :: ByteString -> Maybe DeltaSource
read one delta from a lazy bytestring.
deltaApply :: ByteString -> Delta -> ByteStringSource
apply a delta on a lazy bytestring, returning a new bytestring.