Module Decompress_deflate.RFC1951

module F : sig ... end
type error = error_rfc1951
type ('i, 'o) t = {
hold : int;
bits : int;
temp : ([ Safe.ro | Safe.wo ]'o) Safe.t;
o_off : int;
o_pos : int;
o_len : int;
i_off : int;
i_pos : int;
i_len : int;
level : int;
wbits : int;
read : int32;
write : int;
adler : Checkseum.Adler32.t;
crc : Checkseum.Crc32.t;
state : ('i'o) state;
wi : 'i Buffer.t;
wo : 'o Buffer.t;
}
and ('i, 'o) k = (Safe.ro'i) Safe.t -> (Safe.wo'o) Safe.t -> ('i'o) t -> ('i'o) res
and ('i, 'o) state =
| MakeBlock of ('i'o) block
| WriteBlock of ('i'o) k
| FastBlock of (int * int) array * (int * int) array * Hunk.t Q.t * code * flush
| AlignBlock of F.t option * bool
| FixedBlock of F.t
| DynamicHeader of ('i'o) k
| StaticHeader of ('i'o) k
| AlignF of ('i'o) k
| Finish of int
| Exception of error
and ('i, 'o) res =
| Cont of ('i'o) t
| Wait of ('i'o) t
| Flush of ('i'o) t
| Ok of ('i'o) t
| Error of ('i'o) t * error
and ('i, 'o) block =
| Static of {
lz : 'i Lz77.t;
frequencies : F.t;
deflate : Hunk.t Seq.t;
}
| Dynamic of {
lz : 'i Lz77.t;
frequencies : F.t;
deflate : Hunk.t Seq.t;
}
| Flat of int
and flush =
| Sync of F.t
| Partial of F.t
| Full
| Final
and code =
| Length
| ExtLength
| Dist
| ExtDist
and meth =
| PARTIAL
| SYNC
| FULL
val pp_error : Stdlib.Format.formatter -> error_rfc1951 -> unit
val pp_code : Stdlib.Format.formatter -> code -> unit
val pp_flush : Stdlib.Format.formatter -> flush -> unit
val pp_block : Stdlib.Format.formatter -> ('a'b) block -> unit
val pp_state : Stdlib.Format.formatter -> ('a'b) state -> unit
val pp : Stdlib.Format.formatter -> ('a'b) t -> unit
val await : ('i'o) t -> ('i'o) res
val error : ('i'o) t -> error -> ('i'o) res
val ok : ('i'o) t -> int -> ('i'o) res
val block_of_flush : flush -> ('a'b) state
val put_byte : ctor:(('a -> ([< `Rd | `Wr Wr ] as 'b, 'c) Safe.t -> ('d'c) t -> ('d'c) res) -> ('d'c) state) -> int -> ('a -> ('b'c) Safe.t -> ('d'c) t -> ('d'c) res) -> 'a -> ('b'c) Safe.t -> ('d'c) t -> ('d'c) res
val put_short_lsb : ctor:(('a -> ([< `Rd | `Wr Wr ] as 'b, 'c) Safe.t -> ('d'c) t -> ('d'c) res) -> ('d'c) state) -> int -> ('a -> ('b'c) Safe.t -> ('d'c) t -> ('d'c) res) -> 'a -> ('b'c) Safe.t -> ('d'c) t -> ('d'c) res
val align : ctor:(('a -> ([< `Rd | `Wr Wr ] as 'b, 'c) Safe.t -> ('d'c) t -> ('d'c) res) -> ('d'c) state) -> ('a -> ('b'c) Safe.t -> ('d'c) t -> ('d'c) res) -> 'a -> ('b'c) Safe.t -> ('d'c) t -> ('d'c) res
val put_bits : ctor:(('a -> ([< `Rd | `Wr Wr ] as 'b, 'c) Safe.t -> ('d'c) t -> ('d'c) res) -> ('d'c) state) -> (int * int) -> ('a -> ('b'c) Safe.t -> ('d'c) t -> ('d'c) res) -> 'a -> ('b'c) Safe.t -> ('d'c) t -> ('d'c) res
val put_bit : ctor:(('a -> ([< `Rd | `Wr Wr ] as 'b, 'c) Safe.t -> ('d'c) t -> ('d'c) res) -> ('d'c) state) -> bool -> ('a -> ('b'c) Safe.t -> ('d'c) t -> ('d'c) res) -> 'a -> ('b'c) Safe.t -> ('d'c) t -> ('d'c) res
module KWriteBlock : sig ... end
module KDynamicHeader : sig ... end
val get_tree_symbols : int -> int array -> int -> int array -> int array * int array
val block_of_level : witness:'a Lz77.Buffer.t -> wbits:int -> ?⁠frequencies:F.t -> int -> ('a'b) block
val zip : 'a array -> 'b array -> ('a * 'b) array
val write_block : (int * int) array -> (int * int) array -> Hunk.t Q.t -> flush -> (Safe.ro'a) Safe.t -> (Safe.wo'b) Safe.t -> ('a'b) t -> ('a'b) res
val static : 'a -> Hunk.t Q.t -> ('a -> flush) -> (Safe.ro'b) Safe.t -> (Safe.wo'c) Safe.t -> ('b'c) t -> ('b'c) res
val dynamic : (int array * int array) -> Hunk.t Q.t -> ((int array * int array) -> flush) -> (Safe.ro'a) Safe.t -> (Safe.wo'a) Safe.t -> ('a'a) t -> ('a'a) res
val align_bytes : (Safe.ro'a) Safe.t -> (Safe.wo'b) Safe.t -> ('a'b) t -> ('a'b) res
val write_flat : int -> int -> int -> bool -> (Safe.ro'a) Safe.t -> (Safe.wo'b) Safe.t -> ('a'b) t -> ('a'b) res
val flat : int -> int -> int -> bool -> (Safe.ro'a) Safe.t -> (Safe.wo'b) Safe.t -> ('a'b) t -> ('a'b) res
val make_block : (Lz77.Safe.ro'a) Lz77.Safe.t -> 'b -> ('a'a) t -> ('a'c) block -> ('a'a) res
val fixed_block : F.t -> bool -> (Safe.ro'a) Safe.t -> (Safe.wo'b) Safe.t -> ('a'b) t -> ('a'b) res
val align_block : F.t option -> bool -> (Safe.ro'a) Safe.t -> (Safe.wo'b) Safe.t -> ('a'b) t -> ('a'b) res
val write_fast_block : 'a -> ([< `Rd | `Wr Wr ]'b) Safe.t -> ('c'b) t -> (int * int) array -> (int * int) array -> Hunk.t Q.t -> code -> flush -> ('c'b) res
val flush : int -> int -> ('a'b) t -> ('a'b) t
val get_frequencies : ('a'b) t -> F.t
val set_frequencies : ?⁠paranoid:bool -> (int array * int array) -> ('a'b) t -> ('a'b) t
val to_final : 'a -> flush
val to_partial : F.t -> flush
val to_sync : F.t -> flush
val to_full : 'a -> flush
val finish : ('a'a) t -> ('a'a) t
val no_flush : int -> int -> ('a'b) t -> ('a'b) t
val partial_flush : int -> int -> ('a'a) t -> ('a'a) t
val sync_flush : int -> int -> ('a'a) t -> ('a'a) t
val full_flush : int -> int -> ('a'a) t -> ('a'a) t
val flush_of_meth : meth -> int -> int -> ('a'a) t -> ('a'a) t
val eval0 : (Lz77.Safe.ro'a) Lz77.Safe.t -> (Safe.wo'a) Safe.t -> ('a'a) t -> ('a'a) res
val eval : 'a -> 'a -> ('a'a) t -> [> `Await of ('a'a) t | `End of ('a'a) t | `Error of ('a'a) t * error | `Flush of ('a'a) t ]
val used_in : ('a'b) t -> int
val used_out : ('a'b) t -> int
val read : ('a'b) t -> int32
val bits_remaining : ('a'b) t -> int
val default : witness:'a Safe.Buffer.t -> ?⁠wbits:int -> int -> ('a'a) t
include sig ... end
val to_result : 'a -> 'a -> ?⁠meth:(meth * int) -> ('a -> int option -> int) -> ('a -> int -> int) -> ('a'a) t -> (('a'a) terror) Stdlib.result
val bytes : 'a -> 'a -> ?⁠meth:(meth * int) -> ('a -> int option -> int) -> ('a -> int -> int) -> ('a'a) t -> (('a'a) terror) Stdlib.result
val bigstring : 'a -> 'a -> ?⁠meth:(meth * int) -> ('a -> int option -> int) -> ('a -> int -> int) -> ('a'a) t -> (('a'a) terror) Stdlib.result