package decompress

  1. Overview
  2. Docs

ZLIB layer.

ZLIB is a standard on top of RFC1951. It uses the Dd 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.

module Bigarray = Bigarray_compat

MirageOS compatibility.

The type for bigstring.

type window = De.window

The type for sliding windows.

val io_buffer_size : int

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
module Inf : sig ... end

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 Dd for more details). As M, and unlike Dd, Zz provides a referentially transparent encoder.

The client must use the Def.encoder given by Def.encode instead a encoder given to Def.encode.

module Def : sig ... end
module Higher : sig ... end
OCaml

Innovation. Community. Security.