package decompress

  1. Overview
  2. Docs
type t

This type is deflater.

type src

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
type mode
val make : ?window_bits:int -> ?level:int -> src -> dst -> t

Returns a new input abstraction reading from the given source.

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

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 -> int -> unit

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

val refill : t -> int -> unit
val compress : ?window_bits:int -> ?level:int -> src -> dst -> (src -> bool * int) -> (dst -> int -> int) -> unit
OCaml

Innovation. Community. Security.