package decompress
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=73183dc1186ab6cf1ca641146f6948f2fae6a69729ec0a1e62943385f9895077
sha512=31508b4ae16f6850fd86391f4bb3f950bba12ac45398c8ddb1b6e74f6a96f6a150b81377d6fd49146f1f0789c43a761d709d1d73a782d9c0df0d00a3c9663c89
doc/decompress.zl/Zl/index.html
Module Zl
Source
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.
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
| _ -> ... in
ZLIB 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
.