package decompress

  1. Overview
  2. Docs
Pure OCaml implementation of Zlib

Install

Dune Dependency

Authors

Maintainers

Sources

decompress-0.8.tbz
sha256=ea6987f72816044ccf3edb586e3b64668d53c5ef1b0a735119e5c9d740504240
md5=547eaf0803af3ed01ff7801facfe27e6

doc/decompress.impl/Decompress_impl/RFC1951_deflate/index.html

Module Decompress_impl.RFC1951_deflateSource

Sourcemodule F : sig ... end
Sourcetype ('i, 'o) t = {
  1. hold : int;
  2. bits : int;
  3. temp : ([ Safe.read | Safe.write ], '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. write : int;
  13. adler : Checkseum.Adler32.t;
  14. state : ('i, 'o) state;
}
Sourceand ('i, 'o) k = (Safe.read, 'i) Safe.t -> (Safe.write, 'o) Safe.t -> ('i, 'o) t -> ('i, 'o) res
Sourceand ('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
Sourceand ('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
Sourceand ('i, 'o) block =
  1. | Static of {
    1. lz : 'i L.t;
    2. frequencies : F.t;
    3. deflate : Hunk.t Seq.t;
    }
  2. | Dynamic of {
    1. lz : 'i L.t;
    2. frequencies : F.t;
    3. deflate : Hunk.t Seq.t;
    }
  3. | Flat of int
Sourceand flush =
  1. | Sync of F.t
  2. | Partial of F.t
  3. | Full
  4. | Final
Sourceand code =
  1. | Length
  2. | ExtLength
  3. | Dist
  4. | ExtDist
Sourceand meth =
  1. | PARTIAL
  2. | SYNC
  3. | FULL
Sourceval pp_code : Format.formatter -> code -> unit
Sourceval pp_flush : Format.formatter -> flush -> unit
Sourceval pp_block : Format.formatter -> ('a, 'b) block -> unit
Sourceval pp_state : Format.formatter -> ('a, 'b) state -> unit
Sourceval pp : Format.formatter -> ('a, 'b) t -> unit
Sourceval await : ('a, 'b) t -> ('a, 'b) res
Sourceval error : ('a, 'b) t -> error -> ('c, 'b) res
Sourceval ok : ('a, 'b) t -> int -> ('c, 'b) res
Sourceval block_of_flush : flush -> ('a, 'b) state
Sourceval put_byte : ctor: (('a -> ([< `Read | `Write Write ] as 'b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res) -> ('f, 'e) state) -> int -> ('a -> ('b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res) -> 'a -> ('b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res
Sourceval put_short_lsb : ctor: (('a -> ([< `Read | `Write Write ] as 'b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res) -> ('f, 'e) state) -> int -> ('a -> ('b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res) -> 'a -> ('b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res
Sourceval align : ctor: (('a -> ([< `Read | `Write Write ] as 'b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res) -> ('f, 'e) state) -> ('a -> ('b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res) -> 'a -> ('b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res
Sourceval put_bits : ctor: (('a -> ([< `Read | `Write Write ] as 'b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res) -> ('f, 'e) state) -> (int * int) -> ('a -> ('b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res) -> 'a -> ('b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res
Sourceval put_bit : ctor: (('a -> ([< `Read | `Write Write ] as 'b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res) -> ('f, 'e) state) -> bool -> ('a -> ('b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res) -> 'a -> ('b, 'c) Safe.t -> ('d, 'e) t -> ('f, 'e) res
Sourcemodule KWriteBlock : sig ... end
Sourcemodule KDynamicHeader : sig ... end
Sourceval get_tree_symbols : int -> int array -> int -> int array -> int array * int array
Sourceval block_of_level : wbits:int -> ?frequencies:F.t -> int -> ('a, 'b) block
Sourceval zip : 'a array -> 'b array -> ('a * 'b) array
Sourceval write_block : (int * int) array -> (int * int) array -> Hunk.t Q.t -> flush -> (Safe.read, 'a) Safe.t -> (Safe.write, 'b) Safe.t -> ('a, 'b) t -> ('a, 'b) res
Sourceval static : 'a -> Hunk.t Q.t -> ('a -> flush) -> (Safe.read, 'b) Safe.t -> (Safe.write, 'c) Safe.t -> ('b, 'c) t -> ('b, 'c) res
Sourceval dynamic : (int array * int array) -> Hunk.t Q.t -> ((int array * int array) -> flush) -> (Safe.read, 'a) Safe.t -> (Safe.write, 'a) Safe.t -> ('a, 'a) t -> ('a, 'a) res
Sourceval align_bytes : (Safe.read, 'a) Safe.t -> (Safe.write, 'b) Safe.t -> ('a, 'b) t -> ('a, 'b) res
Sourceval write_flat : int -> int -> int -> bool -> (Safe.read, 'a) Safe.t -> (Safe.write, 'b) Safe.t -> ('a, 'b) t -> ('a, 'b) res
Sourceval flat : int -> int -> int -> bool -> (Safe.read, 'a) Safe.t -> (Safe.write, 'b) Safe.t -> ('a, 'b) t -> ('a, 'b) res
Sourceval make_block : (L.Safe.read, 'a) L.Safe.t -> 'b -> ('c, 'a) t -> ('a, 'd) block -> ('a, 'a) res
Sourceval fixed_block : F.t -> bool -> (Safe.read, 'a) Safe.t -> (Safe.write, 'b) Safe.t -> ('a, 'b) t -> ('a, 'b) res
Sourceval align_block : F.t option -> bool -> (Safe.read, 'a) Safe.t -> (Safe.write, 'b) Safe.t -> ('a, 'b) t -> ('a, 'b) res
Sourceval write_fast_block : 'a -> ([< `Read | `Write Write ], 'b) Safe.t -> ('c, 'd) t -> (int * int) array -> (int * int) array -> Hunk.t Q.t -> code -> flush -> ('e, 'd) res
Sourceval flush : int -> int -> ('a, 'b) t -> ('a, 'b) t
Sourceval get_frequencies : ('a, 'b) t -> F.t
Sourceval set_frequencies : ?paranoid:bool -> (int array * int array) -> ('a, 'b) t -> ('a, 'b) t
Sourceval to_final : 'a -> flush
Sourceval to_partial : F.t -> flush
Sourceval to_sync : F.t -> flush
Sourceval to_full : 'a -> flush
Sourceval finish : ('a, 'b) t -> ('b, 'b) t
Sourceval no_flush : int -> int -> ('a, 'b) t -> ('a, 'b) t
Sourceval partial_flush : int -> int -> ('a, 'b) t -> ('b, 'b) t
Sourceval sync_flush : int -> int -> ('a, 'b) t -> ('b, 'b) t
Sourceval full_flush : int -> int -> ('a, 'b) t -> ('b, 'b) t
Sourceval flush_of_meth : meth -> int -> int -> ('a, 'b) t -> ('b, 'b) t
Sourceval eval0 : (L.Safe.read, 'a) L.Safe.t -> (Safe.write, 'a) Safe.t -> ('a, 'a) t -> ('a, 'a) res
Sourceval eval : 'a Decompress_impl__.Decompress_b.t -> 'a Decompress_impl__.Decompress_b.t -> ('a, 'a) t -> [> `Await of ('a, 'a) t | `End of ('a, 'a) t | `Error of ('a, 'a) t * error | `Flush of ('a, 'a) t ]
Sourceval used_in : ('a, 'b) t -> int
Sourceval used_out : ('a, 'b) t -> int
Sourceval bits_remaining : ('a, 'b) t -> int
Sourceval default : proof:'a B.t -> ?wbits:int -> int -> ('b, 'a) t
include sig ... end
Sourceval to_result : 'a B.t -> 'a B.t -> ?meth:(meth * int) -> ('a B.t -> int option -> int) -> ('a B.t -> int -> int) -> ('a, 'a) t -> (('a, 'a) t, error) result
Sourceval bytes : B.Bytes.t -> B.Bytes.t -> ?meth:(meth * int) -> (B.Bytes.t -> int option -> int) -> (B.Bytes.t -> int -> int) -> (B.st, B.st) t -> ((B.st, B.st) t, error) result
Sourceval bigstring : B.Bigstring.t -> B.Bigstring.t -> ?meth:(meth * int) -> (B.Bigstring.t -> int option -> int) -> (B.Bigstring.t -> int -> int) -> (B.bs, B.bs) t -> ((B.bs, B.bs) t, error) result
OCaml

Innovation. Community. Security.