package decompress

  1. Overview
  2. Docs
module Heap : sig ... end
module Huffman : sig ... end
val reverse_bits : int -> int
module Lookup : sig ... end
type ('i, 'o, 'crc) t = {
  1. last : bool;
  2. hold : int;
  3. bits : int;
  4. o_off : int;
  5. o_pos : int;
  6. o_len : int;
  7. i_off : int;
  8. i_pos : int;
  9. i_len : int;
  10. write : int;
  11. state : ('i, 'o, 'crc) state;
  12. window : ('o, 'crc) Window.t;
  13. wbits : int;
  14. wi : 'i Buffer.t;
  15. wo : 'o Buffer.t;
}
and ('i, 'o, 'crc) k = (Safe.ro, 'i) Safe.t -> (Safe.wo, 'o) Safe.t -> ('i, 'o, 'crc) t -> ('i, 'o, 'crc) res
and ('i, 'o, 'crc) state =
  1. | Last
  2. | Block
  3. | Flat of ('i, 'o, 'crc) k
  4. | Fixed
  5. | Dictionary of ('i, 'o, 'crc) k
  6. | Inffast of Lookup.t * Lookup.t * code
  7. | Inflate of ('i, 'o, 'crc) k
  8. | Switch
  9. | Finish of int
  10. | Exception of error
and ('i, 'o, 'crc) res =
  1. | Cont of ('i, 'o, 'crc) t
  2. | Wait of ('i, 'o, 'crc) t
  3. | Flush of ('i, 'o, 'crc) t
  4. | Ok of ('i, 'o, 'crc) t
  5. | Error of ('i, 'o, 'crc) t * error
and code =
  1. | Length
  2. | ExtLength of int
  3. | Dist of int
  4. | ExtDist of int * int
  5. | Write of int * int
and error = error_rfc1951
val pp_error : Format.formatter -> error_rfc1951 -> unit
val pp_code : Format.formatter -> code -> unit
val pp_state : Format.formatter -> ('a, 'b, 'c) state -> unit
val pp : Format.formatter -> ('a, 'b, 'c) t -> unit
val error : ('a, 'b, 'c) t -> error -> ('d, 'e, 'f) res
val ok : ('a, 'b, 'c) t -> int -> ('d, 'e, 'f) res
val get_byte : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('d, 'e, 'f) t -> ('g, 'h, 'i) res) -> ('j, 'k, 'l) state) -> (int -> ('a, 'b) Safe.t -> 'm -> ('n, 'o, 'p) t -> ('g, 'h, 'i) res) -> ('a, 'b) Safe.t -> 'q -> ('d, 'e, 'f) t -> ('g, 'h, 'i) res
val put_byte : ctor: (('a -> ([< `Rd | `Wr Wr ] as 'b, 'c) Safe.t -> ('d, 'e, 'f) t -> ('g, 'h, 'i) res) -> ('j, 'k, 'l) state) -> int -> ('m -> ('b, 'c) Safe.t -> ('n, 'o, 'p) t -> ('g, 'h, 'i) res) -> 'q -> ('b, 'c) Safe.t -> ('d, 'e, 'f) t -> ('g, 'h, 'i) res
val fill_byte : ctor: (('a -> ([< `Rd | `Wr Wr ] as 'b, 'c) Safe.t -> ('d, 'e, 'f) t -> ('g, 'h, 'i) res) -> ('j, 'k, 'l) state) -> int -> int -> ('m -> ('b, 'c) Safe.t -> ('n, 'o, 'p) t -> ('g, 'h, 'i) res) -> 'q -> ('b, 'c) Safe.t -> ('d, 'e, 'f) t -> ('g, 'h, 'i) res
val peek_bits : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res) -> ('b, 'd, 'e) state) -> int -> (('a, 'b) Safe.t -> 'f -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res) -> ('a, 'b) Safe.t -> 'g -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res
val drop_bits : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('d, 'e, 'f) t -> ('b, 'g, 'h) res) -> ('b, 'g, 'h) state) -> int -> (('a, 'b) Safe.t -> 'i -> ('j, 'k, 'l) t -> ('b, 'g, 'h) res) -> ('a, 'b) Safe.t -> 'm -> ('d, 'e, 'f) t -> ('b, 'g, 'h) res
val get_bits : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('d, 'e, 'f) t -> ('b, 'g, 'h) res) -> ('b, 'g, 'h) state) -> int -> (int -> ('a, 'b) Safe.t -> 'i -> ('j, 'k, 'l) t -> ('b, 'g, 'h) res) -> ('a, 'b) Safe.t -> 'm -> ('d, 'e, 'f) t -> ('b, 'g, 'h) res
val get_with_holding : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res) -> ('b, 'd, 'e) state) -> (int -> ('a, 'b) Safe.t -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res) -> ('a, 'b) Safe.t -> 'f -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res
val get_int16 : ctor: ((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res) -> ('b, 'd, 'e) state) -> (int -> ('a, 'b) Safe.t -> 'f -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res) -> ('a, 'b) Safe.t -> 'g -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res
module KLast : sig ... end
module KBlock : sig ... end
module KDictionary : sig ... end
module KFlat : sig ... end
module KInflate : sig ... end
module Dictionary : sig ... end
val fixed : 'a -> 'b -> ('c, 'd, 'e) t -> ('f, 'g, 'h) res
val dictionary : (Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('a, 'b, 'c) t -> ('a, 'b, 'c) res
val switch : 'a -> 'b -> ('c, 'd, 'e) t -> ('f, 'g, 'h) res
val flat : (Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('a, 'b, 'c) t -> ('a, 'b, 'c) res
val inflate : Lookup.t -> Lookup.t -> (Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('a, 'b, 'c) t -> ('a, 'b, 'c) res
exception End
exception Exn_invalid_distance of int * int
val inffast : ([< `Rd | `Wr Rd ], 'a) Safe.t -> ([< `Rd | `Wr Wr ], 'b) Safe.t -> ('c, 'd, 'e) t -> Lookup.t -> Lookup.t -> code -> ('f, 'g, 'h) res
val block : ([< `Rd | `Wr Rd ], 'a) Safe.t -> 'b -> ('a, 'c, 'd) t -> ('a, 'c, 'd) res
val last : ([< `Rd | `Wr Rd ], 'a) Safe.t -> 'b -> ('a, 'c, 'd) t -> ('a, 'c, 'd) res
val eval0 : (Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('c, 'd, 'e) t -> ('a, 'f, 'g) res
val eval : 'a -> 'b -> ('c, 'c, 'd) t -> [> `Await of ('e, 'f, 'd) t | `End of ('g, 'h, 'd) t | `Error of ('i, 'j, 'd) t * error | `Flush of ('k, 'l, 'd) t ]
val default : witness:'a Buffer.t -> ?wbits:int -> ('b, 'c) Window.t -> ('d, 'e, 'f) t
val refill : int -> int -> ('a, 'b, 'c) t -> ('d, 'e, 'f) t
val flush : int -> int -> ('a, 'b, 'c) t -> ('d, 'e, 'f) t
val used_in : ('a, 'b, 'c) t -> int
val used_out : ('a, 'b, 'c) t -> int
val write : ('a, 'b, 'c) t -> int
val bits_remaining : ('a, 'b, 'c) t -> int
include sig ... end
val to_result : 'a -> 'b -> ('c -> int) -> ('d -> int -> int) -> ('e, 'f, Window.none) t -> (('g, 'h, Window.none) t, error) result
val bytes : 'a -> 'b -> ('c -> int) -> ('c -> int -> int) -> ('d, 'e, Window.none) t -> (('f, 'g, Window.none) t, error) result
val bigstring : 'a -> 'b -> ('c -> int) -> ('c -> int -> int) -> ('d, 'e, Window.none) t -> (('f, 'g, Window.none) t, error) result