package decompress

  1. Overview
  2. Docs

Window used by the Inflate algorithm.

A functionnal implementation of window to use with the inflate algorithm. After one process, you can reset and reuse the window for a new process. This API is available to limit the allocation by Decompress.

type ('o, 'k) t

The Window specialized by 'o (see Buffer.bytes and Buffer.bigstring).

type 'k checksum
type adler32
type crc32
type none
val adler32 : adler32 checksum

Adler-32 algorithm.

val crc32 : crc32 checksum

CRC-32 algorithm.

val none : none checksum

Avoid checksum computation (no algorithm).

val create : crc:'k checksum -> witness:'o Buffer.t -> ('o, 'k) t

create ~crc ~witness creates a new window with a specific crc algorithm (see adler32, crc32 and none).

val reset : ('o, 'k) t -> ('o, 'k) t

reset window resets a window to be reused by an Inflate algorithm.

val crc : ('o, 'k) t -> Optint.t

crc window returns the checksum computed by the window.

OCaml

Innovation. Community. Security.