Module Rfc1951.Inf

type src = [
| `Channel of Stdlib.in_channel
| `String of string
| `Manual
]
type decode = [
| `Await
| `Flush
| `End
| `Malformed of string
]
exception Invalid_huffman
val prefix : (int * int) Heap.queue -> int -> int array
type kind =
| CODES
| LENS
| DISTS
val empty_table : int array * int
val huffman : kind -> int array -> int -> int -> int array * int
type decoder = {
src : src;
mutable i : bigstring;
mutable i_pos : int;
mutable i_len : int;
mutable hold : int;
mutable bits : int;
mutable last : bool;
o : bigstring;
t : bigstring;
mutable t_need : int;
mutable t_len : int;
mutable o_pos : int;
mutable l : int;
mutable d : int;
mutable literal : Lookup.t;
mutable distance : Lookup.t;
mutable jump : jump;
w : WInf.t;
mutable s : state;
mutable k : decoder -> ret;
}
and state =
| Header
| Table of {
hlit : int;
hdist : int;
hclen : int;
}
| Inflate_table of {
t : int array;
l : int;
r : int array;
h : int * int * int;
}
| Inflate
| Slow
| Flat_header
| Dynamic_header
| Flat
| End_of_inflate
and jump =
| Length
| Extra_length
| Distance
| Extra_distance
| Write
and ret =
| Await
| Flush
| End
| K
| Malformed of string
val malformedf : ( 'a, Stdlib.Format.formatter, unit, ret ) Stdlib.format4 -> 'b
val eoi : decoder -> unit
val final : 'a -> ret
val err_unexpected_end_of_input : decoder -> ret
val err_invalid_kind_of_block : decoder -> ret
val err_invalid_dictionary : decoder -> ret
val err_invalid_complement_of_length : decoder -> ret
val err_invalid_distance : decoder -> ret
val err_invalid_distance_code : decoder -> ret
val i_rem : decoder -> int
val src : decoder -> ( char, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout ) Stdlib.Bigarray.Array1.t -> int -> int -> unit
val refill : ( decoder -> ret ) -> decoder -> ret
val c_peek_bits : int -> ( decoder -> ret ) -> decoder -> ret
val t_need : decoder -> int -> unit
val t_fill : ( decoder -> ret ) -> decoder -> ret
val reverse_bits : int -> int
val fixed_lit : Lookup.t
val fixed_dist : Lookup.t
val checksum : decoder -> optint
val flat : decoder -> ret
val flat_header : decoder -> ret
val c_put_byte : int -> ( decoder -> ret ) -> decoder -> ret
val slow_inflate : Lookup.t -> Lookup.t -> jump -> decoder -> ret
val inflate : Lookup.t -> Lookup.t -> jump -> decoder -> ret
val fixed : decoder -> ret
val make_table : int array -> int -> int -> decoder -> ret
val inflate_table : decoder -> ret
val table : decoder -> ret
val (//) : int -> int -> int
val dynamic : decoder -> ret
val decode_k : decoder -> ret
val decode : decoder -> [> `Await | `End | `Flush | `Malformed of string ]
val dst_rem : decoder -> int
val src_rem : decoder -> int
val flush : decoder -> unit
val decoder : src -> o:bigstring -> w:bigstring -> decoder
val reset : decoder -> unit
module Ns : sig ... end