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) 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 {
} | |||
| Dynamic of {
} | |||
| Flat of int |
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 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 block_of_level : witness:'a Lz77.Buffer.t -> wbits:int -> ?frequencies:F.t -> int -> ('a, 'b) block
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 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 to_final : 'a -> flush
val to_full : 'a -> flush
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) t, error) Stdlib.result
val bytes : 'a -> 'a -> ?meth:(meth * int) -> ('a -> int option -> int) -> ('a -> int -> int) -> ('a, 'a) t -> (('a, 'a) t, error) Stdlib.result
val bigstring : 'a -> 'a -> ?meth:(meth * int) -> ('a -> int option -> int) -> ('a -> int -> int) -> ('a, 'a) t -> (('a, 'a) t, error) Stdlib.result