package decompress
Module Zl.HigherSource
Source
val compress :
?level:int ->
?dynamic:bool ->
w:De.Lz77.window ->
q:De.Queue.t ->
refill:(bigstring -> int) ->
flush:(bigstring -> int -> unit) ->
bigstring ->
bigstring ->
unitcompress ?level ~w ~q ~refill ~flush i o is Zlib.compress (with ~header:true) provided by camlzip package.
wis the window used by LZ77 compression algorithm.qis shared-queue between compression algorithm and DEFLATE encoder.iis input buffer.ois output buffer.
When compress wants more input, it calls refill with i. The client returns how many bytes he wrote into i. If he returns 0, he signals end of input.
When compress has written output buffer, it calls flush with o and how many bytes it wrote.
Source
val uncompress :
allocate:(int -> window) ->
refill:(bigstring -> int) ->
flush:(bigstring -> int -> unit) ->
bigstring ->
bigstring ->
(unit, [> `Msg of string ]) resultuncompress ~allocate ~refill ~flush i o is Zlib.uncompress (with ~header:true) provided by camlzip package.
allocateis the allocator of window used by LZ77 uncompression algorithmiis input buffer.ois output buffer.
When compress wants more input, it calls refill with i. The client returns how many bytes he wrote into i. If he returns 0, he signals end of input.
When compress has written output buffer, it calls flush with o and how many bytes it wrote.