package decompress

  1. Overview
  2. Docs
module F : sig ... end
type error = error_rfc1951
type ('i, 'o) t = {
  1. hold : int;
  2. bits : int;
  3. temp : ([ Safe.ro | Safe.wo ], 'o) Safe.t;
  4. o_off : int;
  5. o_pos : int;
  6. o_len : int;
  7. i_off : int;
  8. i_pos : int;
  9. i_len : int;
  10. level : int;
  11. wbits : int;
  12. read : int32;
  13. write : int;
  14. adler : Checkseum.Adler32.t;
  15. crc : Checkseum.Crc32.t;
  16. state : ('i, 'o) state;
  17. wi : 'i Buffer.t;
  18. 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 =
  1. | MakeBlock of ('i, 'o) block
  2. | WriteBlock of ('i, 'o) k
  3. | FastBlock of (int * int) array * (int * int) array * Hunk.t Q.t * code * flush
  4. | AlignBlock of F.t option * bool
  5. | FixedBlock of F.t
  6. | DynamicHeader of ('i, 'o) k
  7. | StaticHeader of ('i, 'o) k
  8. | AlignF of ('i, 'o) k
  9. | Finish of int
  10. | Exception of error
and ('i, 'o) res =
  1. | Cont of ('i, 'o) t
  2. | Wait of ('i, 'o) t
  3. | Flush of ('i, 'o) t
  4. | Ok of ('i, 'o) t
  5. | Error of ('i, 'o) t * error
and ('i, 'o) block =
  1. | Static of {
    1. lz : 'i Lz77.t;
    2. frequencies : F.t;
    3. deflate : Hunk.t Seq.t;
    }
  2. | Dynamic of {
    1. lz : 'i Lz77.t;
    2. frequencies : F.t;
    3. deflate : Hunk.t Seq.t;
    }
  3. | Flat of int
and flush =
  1. | Sync of F.t
  2. | Partial of F.t
  3. | Full
  4. | Final
and code =
  1. | Length
  2. | ExtLength
  3. | Dist
  4. | ExtDist
and meth =
  1. | PARTIAL
  2. | SYNC
  3. | FULL
val pp_error : Format.formatter -> error_rfc1951 -> unit
val pp_code : Format.formatter -> code -> unit
val pp_flush : Format.formatter -> flush -> unit
val pp_block : Format.formatter -> ('a, 'b) block -> unit
val pp_state : Format.formatter -> ('a, 'b) state -> unit
val pp : Format.formatter -> ('a, 'b) t -> unit
val await : ('i, 'o) t -> ('i0, 'o0) res
val error : ('i, 'o) t -> error -> ('i0, 'o0) res
val ok : ('i, 'o) t -> int -> ('i0, 'o0) res
val block_of_flush : flush -> ('a, 'b) state
val put_byte : ctor: (('a -> ([< `Rd | `Wr Wr ] as 'b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'g) res) -> ('h, 'i) state) -> int -> ('j -> ('b, 'c) Safe.t -> ('k, 'l) t -> ('f, 'g) res) -> 'm -> ('b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'g) 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) -> 'e -> ('b, 'c) Safe.t -> ('d, 'c) t -> ('d, 'c) res
val align : ctor: (('a -> ([< `Rd | `Wr Wr ] as 'b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'c) res) -> ('f, 'c) state) -> ('g -> ('h, 'i) Safe.t -> ('j, 'k) t -> ('f, 'c) res) -> 'l -> ('h, 'i) Safe.t -> ('d, 'e) t -> ('f, 'c) res
val put_bits : ctor: (('a -> ([< `Rd | `Wr Wr ] as 'b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'c) res) -> ('f, 'c) state) -> (int * int) -> ('g -> ('b, 'c) Safe.t -> ('h, 'i) t -> ('f, 'c) res) -> 'j -> ('b, 'c) Safe.t -> ('d, 'e) t -> ('f, '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) -> 'e -> ('f, 'g) 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 -> ('b, 'c) block
val zip : 'a array -> 'b array -> ('c * 'd) 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 -> ('c, 'd) t -> ('a, 'b) res
val static : 'a -> Hunk.t Q.t -> ('b -> flush) -> (Safe.ro, 'c) Safe.t -> (Safe.wo, 'd) Safe.t -> ('c, 'd) t -> ('c, 'd) res
val dynamic : (int array * int array) -> Hunk.t Q.t -> ((int array * int array) -> flush) -> (Safe.ro, 'a) Safe.t -> (Safe.wo, 'b) Safe.t -> ('a, 'b) t -> ('a, 'b) 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 -> ('c, 'd) t -> ('e, 'f) 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 -> ('c, 'd) t -> ('e, 'f) block -> ('g, 'h) 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, 'd) t -> (int * int) array -> (int * int) array -> Hunk.t Q.t -> code -> flush -> ('e, 'f) res
val flush : int -> int -> ('a, 'b) t -> ('c, 'd) t
val get_frequencies : ('a, 'b) t -> F.t
val set_frequencies : ?paranoid:bool -> (int array * int array) -> ('a, 'b) t -> ('c, 'd) 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, 'b) t -> ('c, 'd) t
val no_flush : int -> int -> ('a, 'b) t -> ('c, 'd) t
val partial_flush : int -> int -> ('a, 'b) t -> ('c, 'd) t
val sync_flush : int -> int -> ('a, 'b) t -> ('c, 'd) t
val full_flush : int -> int -> ('a, 'b) t -> ('c, 'd) 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, 'b) Safe.t -> ('c, 'd) t -> ('a, 'a) res
val eval : 'a -> 'b -> ('c, 'c) t -> [> `Await of ('d, 'e) t | `End of ('f, 'g) t | `Error of ('h, 'i) t * error | `Flush of ('j, 'k) 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 -> ('b, 'c) t
include sig ... end
val to_result : 'a -> 'b -> ?meth:(meth * int) -> ('c -> int option -> int) -> ('d -> int -> int) -> ('e, 'f) t -> (('g, 'h) t, error) result
val bytes : 'a -> 'b -> ?meth:(meth * int) -> ('c -> int option -> int) -> ('c -> int -> int) -> ('d, 'e) t -> (('f, 'g) t, error) result
val bigstring : 'a -> 'b -> ?meth:(meth * int) -> ('c -> int option -> int) -> ('c -> int -> int) -> ('d, 'e) t -> (('f, 'g) t, error) result