package rfc1951

  1. Overview
  2. Docs
type dst = [
  1. | `Channel of out_channel
  2. | `Buffer of Buffer.t
  3. | `Manual
]
type dynamic = {
  1. ltree : T.tree;
  2. dtree : T.tree;
  3. bltree : T.tree;
  4. h_lit : int;
  5. h_dst : int;
  6. h_len : int;
  7. 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 =
  1. | Flat of int
  2. | Fixed
  3. | Dynamic of dynamic
type block = {
  1. kind : kind;
  2. last : bool;
}
type encode = [
  1. | `Await
  2. | `Flush
  3. | `Block of block
]
val exists : [< `Copy of int * int | `End | `Literal of char ] -> block -> bool
type encoder = {
  1. dst : dst;
  2. mutable blk : block;
  3. mutable hold : int;
  4. mutable bits : int;
  5. mutable bits_rem : [ `Rem of int | `Pending ];
  6. mutable flat : int;
  7. mutable o : bigstring;
  8. mutable o_pos : int;
  9. mutable o_max : int;
  10. b : Queue.t;
  11. mutable k : encoder -> encode -> [ `Ok | `Partial | `Block ];
}
val o_rem : encoder -> int
val dst : encoder -> (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) 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 -> int -> (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 {
  1. hold : int;
  2. 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
OCaml

Innovation. Community. Security.