package decompress

  1. Overview
  2. Docs

Parameters

Signature

type t

This type is deflater.

type src = [
  1. | `String of int * String.t
  2. | `Channel of in_channel
  3. | `Manual of unit -> String.t * bool
]

The type for input sources. For `String starts reading at the given integer position. For `Manual the function must return the next bytes and if this block is last or not and raise End_of_file if there is no such byte.

type dst = X.t
val make : ?window_bits:int -> [< src ] -> dst -> t

Returns a new input abstraction reading from the given source.

val eval : t -> [ `Ok | `Flush | `Error ]

eval deflater performs deflater. The value os eval deflater is:

  • `Ok complete the document
  • `Flush wait to flush the dst for re-writing a news values in dst
  • `Error a very bad state
val contents : t -> int

Returns a number of bytes writing in the dst.

val flush : t -> unit

Clean the dst to re-writing a news values after.

OCaml

Innovation. Community. Security.