Module Rfc1951.Def

type dst = [
| `Channel of Stdlib.out_channel
| `Buffer of Stdlib.Buffer.t
| `Manual
]
type dynamic = {
ltree : T.tree;
dtree : T.tree;
bltree : T.tree;
h_lit : int;
h_dst : int;
h_len : int;
symbols : int array;
}
val bl_tree : T.tree -> T.tree -> bl_count:int array -> int * T.tree
val dynamic_of_frequencies : literals:int array -> distances:int array -> dynamic
val invalid_encode : unit -> 'a
type kind =
| Flat
| Fixed
| Dynamic of dynamic
type block = {
kind : kind;
last : bool;
}
type encode = [
| `Await
| `Flush
| `Block of block
]
val exists : [< `Copy of int * int | `End | `Literal of char ] -> block -> bool
type encoder = {
dst : dst;
mutable blk : block;
mutable hold : int;
mutable bits : int;
mutable bits_rem : [ `Rem of int | `Pending ];
mutable flat : int;
mutable fmax : int;
mutable o : bigstring;
mutable o_pos : int;
mutable o_max : int;
b : Queue.t;
mutable k : encoder -> encode -> [ `Ok | `Partial | `Block ];
}
val o_rem : encoder -> int
val dst : encoder -> ( char, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout ) Stdlib.Bigarray.Array1.t -> int -> int -> unit
val partial : ( 'a -> 'b ) -> 'c -> [< `Await | `Block of 'd | `Copy of 'e | `End | `Flush | `Literal of 'f ] -> 'g
val flush : ( encoder -> [ `Block | `Ok | `Partial ] ) -> encoder -> [ `Block | `Ok | `Partial ]
val c_byte : int -> ( encoder -> [ `Block | `Ok | `Partial ] ) -> encoder -> [ `Block | `Ok | `Partial ]
val c_short : int -> ( encoder -> [ `Block | `Ok | `Partial ] ) -> encoder -> [ `Block | `Ok | `Partial ]
val c_bits : int -> int -> ( encoder -> [ `Block | `Ok | `Partial ] ) -> encoder -> [ `Block | `Ok | `Partial ]
val ensure : int -> ( encoder -> [ `Block | `Ok | `Partial ] ) -> encoder -> [ `Block | `Ok | `Partial ]
val encode_flat_header : bool -> ( encoder -> [ `Block | `Ok | `Partial ] ) -> encoder -> [ `Block | `Ok | `Partial ]
val encode_huffman : dynamic -> ( encoder -> [ `Block | `Ok | `Partial ] ) -> encoder -> [ `Block | `Ok | `Partial ]
val encode_zigzag : dynamic -> ( encoder -> [ `Block | `Ok | `Partial ] ) -> encoder -> [ `Block | `Ok | `Partial ]
val encode_dynamic_header : bool -> dynamic -> ( encoder -> [ `Block | `Ok | `Partial ] ) -> encoder -> [ `Block | `Ok | `Partial ]
val encode_fixed_header : bool -> ( encoder -> [ `Block | `Ok | `Partial ] ) -> encoder -> [ `Block | `Ok | `Partial ]
val pending_bits : ( encoder -> [ `Block | `Ok | `Partial ] ) -> encoder -> [ `Block | `Ok | `Partial ]
exception Flush_bits of {
hold : int;
bits : int;
}
val block : encoder -> encode -> [ `Block | `Ok | `Partial ]
val flush_bits : bits:int -> hold:int -> ( encoder -> [ `Block | `Ok | `Partial ] ) -> encoder -> [ `Block | `Ok | `Partial ]
val write : encoder -> [ `Block | `Ok | `Partial ]
val force : block -> encoder -> [ `Block | `Ok | `Partial ]
val write_flat : encoder -> [ `Block | `Ok | `Partial ]
val first_entry : encoder -> [< `Await | `Block of block | `Flush ] -> [ `Block | `Ok | `Partial ]
val dst_rem : encoder -> int
val bits_rem : encoder -> int
val encoder : dst -> q:Queue.t -> encoder
val encode : encoder -> encode -> [ `Block | `Ok | `Partial ]
module Ns : sig ... end