package decompress

  1. Overview
  2. Docs
type ('i, 'o) t = {
  1. d : ('i, 'o, crc) RFC1951.t;
  2. z : ('i, 'o) state;
  3. mtime : Optint.t;
  4. xfl : int;
  5. os : OS.t;
  6. extra_l : int option;
  7. extra : string option;
  8. name : string option;
  9. comment : string option;
  10. crc16 : Optint.t;
  11. hcrc16 : int option;
}
and ('i, 'o) k = (Safe.ro, 'i) Safe.t -> (Safe.wo, 'o) Safe.t -> ('i, 'o) t -> ('i, 'o) res
and ('i, 'o) state =
  1. | Header of ('i, 'o) k
  2. | Inflate
  3. | Crc32 of ('i, 'o) k
  4. | Size of ('i, 'o) k
  5. | Finish
  6. | Exception of error
and ('i, 'o) res =
  1. | Cont of ('i, 'o) t
  2. | Wait of ('i, 'o) t
  3. | Flush of ('i, 'o) t
  4. | Ok of ('i, 'o) t
  5. | Error of ('i, 'o) t * error
and error = error_g
and crc = Window.crc32
val pp_error : Format.formatter -> error_g -> unit
val pp_state : Format.formatter -> ('a, 'b) state -> unit
val pp : Format.formatter -> ('a, 'b) t -> unit
val error : ('a, 'b) t -> error -> ('c, 'd) res
val ok : ('a, 'b) t -> ('c, 'd) res
val get_byte : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('d, 'e) t -> ('f, 'g) res) -> ('h, 'i) state) -> (int -> ('a, 'b) Safe.t -> 'j -> ('k, 'l) t -> ('f, 'g) res) -> ('a, 'b) Safe.t -> 'm -> ('d, 'e) t -> ('f, 'g) res
val get_with_holding : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('b, 'd) t -> ('b, 'd) res) -> ('b, 'd) state) -> (int -> ('a, 'b) Safe.t -> 'c -> ('b, 'd) t -> ('b, 'd) res) -> ('a, 'b) Safe.t -> 'e -> ('b, 'd) t -> ('b, 'd) res
val peek_bits : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('b, 'd) t -> ('b, 'd) res) -> ('b, 'd) state) -> int -> (('a, 'b) Safe.t -> 'e -> ('b, 'd) t -> ('b, 'd) res) -> ('a, 'b) Safe.t -> 'f -> ('b, 'd) t -> ('b, 'd) res
val drop_bits : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('d, 'e) t -> ('b, 'f) res) -> ('b, 'f) state) -> int -> (('a, 'b) Safe.t -> 'g -> ('h, 'i) t -> ('b, 'f) res) -> ('a, 'b) Safe.t -> 'j -> ('d, 'e) t -> ('b, 'f) res
val get_int16 : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('b, 'd) t -> ('b, 'd) res) -> ('b, 'd) state) -> (int -> ('a, 'b) Safe.t -> 'e -> ('b, 'd) t -> ('b, 'd) res) -> ('a, 'b) Safe.t -> 'f -> ('b, 'd) t -> ('b, 'd) res
val get_string : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('b, 'd) t -> ('b, 'd) res) -> ('b, 'd) state) -> int -> (string -> ('a, 'b) Safe.t -> 'e -> ('b, 'd) t -> ('b, 'd) res) -> ('a, 'b) Safe.t -> 'f -> ('b, 'd) t -> ('b, 'd) res
val get_zero_term_string : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('b, 'd) t -> ('b, 'd) res) -> ('b, 'd) state) -> (string -> ('a, 'b) Safe.t -> 'e -> ('b, 'd) t -> ('b, 'd) res) -> ('a, 'b) Safe.t -> 'f -> ('b, 'd) t -> ('b, 'd) res
val digest_crc16_byte : (int -> 'a -> 'b -> ('c, 'd) t -> 'e) -> int -> 'f -> 'g -> ('h, 'i) t -> 'j
val digest_crc16_int16 : (int -> 'a -> 'b -> ('c, 'd) t -> 'e) -> int -> 'f -> 'g -> ('h, 'i) t -> 'j
val digest_crc16_z_string : (String.t -> 'a -> 'b -> ('c, 'd) t -> 'e) -> String.t -> 'f -> 'g -> ('h, 'i) t -> 'j
val digest_crc16_n_string : (String.t -> 'a -> 'b -> ('c, 'd) t -> 'e) -> int -> String.t -> 'f -> 'g -> ('h, 'i) t -> 'j
module KHeader : sig ... end
module KCrc : sig ... end
module KSize : sig ... end
val size : (Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('a, 'b) t -> ('a, 'b) res
val crc32 : (Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('a, 'b) t -> ('a, 'b) res
val inflate : (Safe.ro, 'a) Safe.t -> (Safe.wo, 'a) Safe.t -> ('b, 'c) t -> ('d, 'e) res
val nop : ('a -> 'b -> 'c -> 'd) -> 'e -> 'f -> 'g -> 'h
val fextra : ((Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('c, 'd) t -> ('e, 'f) res) -> (Safe.ro, 'e) Safe.t -> (Safe.wo, 'f) Safe.t -> ('e, 'f) t -> ('e, 'f) res
val fname : ((Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('c, 'd) t -> ('a, 'b) res) -> (Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('a, 'b) t -> ('a, 'b) res
val fcomment : ((Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('c, 'd) t -> ('a, 'b) res) -> (Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('a, 'b) t -> ('a, 'b) res
val fcrc16 : ((Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('c, 'd) t -> ('a, 'b) res) -> (Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('a, 'b) t -> ('a, 'b) res
val header : (Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('c, 'd) t -> ('c, 'd) res
val eval : 'a -> 'b -> ('c, 'd) t -> [> `Await of ('e, 'f) t | `End of ('g, 'h) t | `Error of ('i, 'j) t * error | `Flush of ('k, 'l) t ]
val default : witness:'a Buffer.t -> ?wbits:int -> ('a, crc) Window.t -> ('b, 'c) t
val refill : int -> int -> ('a, 'b) t -> ('c, 'd) t
val flush : int -> int -> ('a, 'b) t -> ('c, 'd) t
val used_in : ('a, 'b) t -> int
val used_out : ('a, 'b) t -> int
val write : ('a, 'b) t -> int
val xfl : ('a, 'b) t -> int
val os : ('a, 'b) t -> OS.t
val mtime : ('a, 'b) t -> Optint.t
val extra : ('a, 'b) t -> string option
val name : ('a, 'b) t -> string option
val comment : ('a, 'b) t -> string option
include sig ... end
val to_result : 'a -> 'b -> ('c -> int) -> ('d -> int -> int) -> ('e, 'f) t -> (('g, 'h) t, error) result
val bytes : 'a -> 'b -> ('c -> int) -> ('c -> int -> int) -> ('d, 'e) t -> (('f, 'g) t, error) result
val bigstring : 'a -> 'b -> ('c -> int) -> ('c -> int -> int) -> ('d, 'e) t -> (('f, 'g) t, error) result