package decompress

  1. Overview
  2. Docs
Implementation of Zlib and GZip in OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

decompress-v1.2.0.tbz
sha256=51983d4497ccb27c253e7464b03d38544aad51e0e7d537e405f4df6954c27ab0
sha512=17c7e3dc79b7cedaf649c208874a50a810002c71d061c133239b9813a9dfe424ba303a968ba68c728862bb20ceaa23465097334bc16b819317390d01c2f91f89

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.

module Bigarray = Bigarray_compat

MirageOS compatibility.

Sourcetype bigstring = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t

The type for bigstring.

Sourcetype window = De.window

The type for sliding windows.

Sourceval 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
Sourcemodule 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 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.

Sourcemodule Def : sig ... end
Sourcemodule Higher : sig ... end
OCaml

Innovation. Community. Security.