module Heap : sig ... endmodule Huffman : sig ... endmodule Lookup : sig ... endtype ('i, 'o, 'crc) t = {last : bool; |
hold : int; |
bits : int; |
o_off : int; |
o_pos : int; |
o_len : int; |
i_off : int; |
i_pos : int; |
i_len : int; |
write : int; |
state : ('i, 'o, 'crc) state; |
window : ('o, 'crc) Window.t; |
wbits : int; |
wi : 'i Buffer.t; |
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) resand ('i, 'o, 'crc) state = | Last |
| Block |
| Flat of ('i, 'o, 'crc) k |
| Fixed |
| Dictionary of ('i, 'o, 'crc) k |
| Inffast of Lookup.t * Lookup.t * code |
| Inflate of ('i, 'o, 'crc) k |
| Switch |
| Finish of int |
| Exception of error |
and ('i, 'o, 'crc) res = | Cont of ('i, 'o, 'crc) t |
| Wait of ('i, 'o, 'crc) t |
| Flush of ('i, 'o, 'crc) t |
| Ok of ('i, 'o, 'crc) t |
| Error of ('i, 'o, 'crc) t * error |
and error = error_rfc1951val pp_error : Stdlib.Format.formatter -> error_rfc1951 -> unitval pp_code : Stdlib.Format.formatter -> code -> unitval pp_state : Stdlib.Format.formatter -> ('a, 'b, 'c) state -> unitval pp : Stdlib.Format.formatter -> ('a, 'b, 'c) t -> unitval get_byte : 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 -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) resval put_byte : ctor:(('a -> ([< `Rd | `Wr Wr ] as 'b, 'c) Safe.t -> ('d, 'c, 'e) t -> ('d, 'c, 'e) res) -> ('d, 'c, 'e) state) -> int -> ('a -> ('b, 'c) Safe.t -> ('d, 'c, 'e) t -> ('d, 'c, 'e) res) -> 'a -> ('b, 'c) Safe.t -> ('d, 'c, 'e) t -> ('d, 'c, 'e) resval fill_byte : ctor:(('a -> ([< `Rd | `Wr Wr ] as 'b, 'c) Safe.t -> ('d, 'c, 'e) t -> ('d, 'c, 'e) res) -> ('d, 'c, 'e) state) -> int -> int -> ('a -> ('b, 'c) Safe.t -> ('d, 'c, 'e) t -> ('d, 'c, 'e) res) -> 'a -> ('b, 'c) Safe.t -> ('d, 'c, 'e) t -> ('d, 'c, 'e) resval 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 -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res) -> ('a, 'b) Safe.t -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) resval drop_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 -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res) -> ('a, 'b) Safe.t -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) resval get_bits : ctor:((([< `Rd | `Wr Rd ] as 'a, 'b) Safe.t -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res) -> ('b, 'd, 'e) state) -> int -> (int -> ('a, 'b) Safe.t -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res) -> ('a, 'b) Safe.t -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) resval 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 -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) resval 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 -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) res) -> ('a, 'b) Safe.t -> 'c -> ('b, 'd, 'e) t -> ('b, 'd, 'e) resmodule KLast : sig ... endmodule KBlock : sig ... endmodule KDictionary : sig ... endmodule KFlat : sig ... endmodule KInflate : sig ... endmodule Dictionary : sig ... endval inflate : Lookup.t -> Lookup.t -> (Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('a, 'b, 'c) t -> ('a, 'b, 'c) resval inffast : ([< `Rd | `Wr Rd ], 'a) Safe.t -> ([< `Rd | `Wr Wr ], 'b) Safe.t -> ('a, 'b, 'c) t -> Lookup.t -> Lookup.t -> code -> ('a, 'b, 'c) resval eval : 'a -> 'a -> ('a, 'a, 'b) t -> [> `Await of ('a, 'a, 'b) t | `End of ('a, 'a, 'b) t | `Error of ('a, 'a, 'b) t * error | `Flush of ('a, 'a, 'b) t ]val used_in : ('a, 'b, 'c) t -> intval used_out : ('a, 'b, 'c) t -> intval write : ('a, 'b, 'c) t -> intval bits_remaining : ('a, 'b, 'c) t -> intinclude sig ... end
val to_result : 'a -> 'a -> ('a -> int) -> ('a -> int -> int) -> ('a, 'a, Window.none) t -> (('a, 'a, Window.none) t, error) Stdlib.resultval bytes : 'a -> 'a -> ('a -> int) -> ('a -> int -> int) -> ('a, 'a, Window.none) t -> (('a, 'a, Window.none) t, error) Stdlib.resultval bigstring : 'a -> 'a -> ('a -> int) -> ('a -> int -> int) -> ('a, 'a, Window.none) t -> (('a, 'a, Window.none) t, error) Stdlib.result