package decompress
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=0130ea6acb61b0a25393fa23148e116d7a17c77558196f7abddaee9e05a1d7a8
sha512=1668df538fba7c96574146a18fcbeef5200ea0e36110ec94c9b9924e368f465447702029fdb00d2749ca55081169b0e7c74e2f0887e4367ec580633e1e2a1c6c
doc/decompress.zl/Zl/index.html
Module ZlSource
ZLIB layer.
ZLIB is a standard on top of RFC1951. It uses the De implementation with the LZ77 compression algorithm. Module provides non-blocking streaming codec to decode and encode ZLIB encoding. It can efficiently work payload by payload without blocking IO.
MirageOS compatibility.
The type for bigstring.
ZLIB Decoder.
Unlike de, zl provides a referentially transparent Inf.decoder. The client must use a Inf.decoder given by Inf.decode instead of a decoder given to Inf.decode. A common use of zl is:
let rec go d0 = match Inf.decode d0 with
| `Await d1 -> ... go d1
| `Flush d1 -> ... go d1
| _ -> ... inZLIB Encoder.
ZLIB encoder is glue between the LZ77 algorithm and the DEFLATE encoder, prefixed with a ZLIB header. Any deal with compression algorithm is not possible on this layer (see De for more details). As Inf, and unlike De, Zl provides a referentially transparent encoder.
The client must use the Def.encoder given by Def.encode instead a encoder given to Def.encode.