package decompress
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=f91e6978beff3fcb61440d32f7c99c99f1e8654b4fb18408741d36035373ac60
sha512=c3f402404f76075e6f692ea36e701134a5d833824d5d1166365c6c81fb18b309270bf288ce4c118ac44fd0366d9b6eea0a6309255678d8e1bd2bbfa7ba843461
doc/decompress.de/De/Inf/index.html
Module De.Inf
Source
The type for input sources. With a `Manual
source the client must provide input with src
. With `String
or `Channel
source the client can safely discard `Await
case (with assert false
).
The type for decoders.
decoder src ~o ~w
is a decoder that inputs from src
.
Output buffer.
de
uses o
buffer as internal buffer to store output. We recommend to allocate an io_buffer_size
buffer as output buffer. Then, dst_rem
gives you how many bytes it remains in o
.
Window.
de
needs a window to be able to interpret `Copy
code. Length of window is commonly 32k bytes (but the client can use a smaller one with some assumptions).
decode d
is:
`Await
ifd
has a`Manual
input source and awaits for more input. The client must usesrc
to provide it.`Flush d
if given output buffero
(seedecoder
) is full. The client must useflush
to completely flusho
.dst_rem
gives you how many bytes it remains ino
.Inf.dst_rem d - bigstring_length o
gives you how many bytes are available.`Malformed err
if given input is malformed.err
is a human-readable error.`End
if given input notify end of flow.o
is possibly not empty (it can be check withdst_rem
).
src d s j l
provides d
with l
bytes to read, starting at j
in s
. This byte range is read by calls to decode
with d
until `Await
is returned. To signal the end of input call the function with l = 0
.