package decompress

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

Install

Dune Dependency

Authors

Maintainers

Sources

decompress-1.4.3.tbz
sha256=b22254ae5eb7747452267fc976a3a0ba408c5afdae0896cac4068b4d79ed5a3d
sha512=96f62147f4e0548bb7c4680c4f9d7492a2b4a9e15bc100447b16842e3d1b43ed902fdef03907e1416c174a0586428e515f2deef53ed04098a0443a535938dd6d

doc/decompress.gz/Gz/index.html

Module GzSource

GZIP layer.

GZIP is a standard on top of RFC1951 according RFC1952. It uses the De implementation with the LZ77 compression algorithm. Module provides non-blocking streaming codec to decode and encode GZIP encoding. It can efficiently work payload by payload without blocking IO.

Type type for bigstring.

Sourcetype window = De.window

The type for sliding window.

Sourceval io_buffer_size : int
Sourcetype os =
  1. | FAT
  2. | Amiga
  3. | VMS
  4. | Unix
  5. | VM
  6. | Atari
  7. | HPFS
  8. | Macintosh
  9. | Z
  10. | CPM
  11. | TOPS20
  12. | NTFS
  13. | QDOS
  14. | Acorn
  15. | Unknown

The type for Operating-System.

Sourceval pp_os : Format.formatter -> os -> unit

Pretty-printer of os.

Sourceval equal_os : os -> os -> bool

equal_os a b returns true if a is exactly the same os than b. Otherwise, it returns false.

GZIP Decoder.

Unlike de, gz 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 gz is:

  let rec go d0 = match Inf.decode d0 with
    | `Await d1 -> ... go d1
    | `Flush d1 -> ... go d1
    | _ -> .... in
Sourcemodule Inf : sig ... end

GZIP Encoder.

GZIP encoder is glue between the LZ77 algorithm and the DEFLATE encoder, prefixed with a GZIP header. Any deal with compression algorithm is not possible on this layer (see De for more details). As Inf, and unlike De, Gz 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.