package decompress

  1. Overview
  2. Docs

Parameters

Signature

type t

This type is inflater.

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

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

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

Returns a new input abstraction reading from the given source.

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

eval inflater performs inflater. The value os eval inflater 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.