package decompress
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=0130ea6acb61b0a25393fa23148e116d7a17c77558196f7abddaee9e05a1d7a8
sha512=1668df538fba7c96574146a18fcbeef5200ea0e36110ec94c9b9924e368f465447702029fdb00d2749ca55081169b0e7c74e2f0887e4367ec580633e1e2a1c6c
doc/decompress.de/De/Inf/index.html
Module De.InfSource
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:
`Awaitifdhas a`Manualinput source and awaits for more input. The client must usesrcto provide it.`Flush dif given output buffero(seedecoder) is full. The client must useflushto completely flusho.dst_remgives you how many bytes it remains ino.Inf.dst_rem d - bigstring_length ogives you how many bytes are available.`Malformed errif given input is malformed.erris a human-readable error.`Endif given input notify end of flow.ois 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.