package decompress
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=822f125b46c87f4a902c334db8c86d4d5f33ebe978e93c40351a4d3269b95225
    
    
  sha512=9cb82615923a5fffc5c8dce1d9361a467e35e91092c25c98f5afda8f4226059c59eb695c55e63adf92d766c7747e15df186386bcaeb399497dd1ae5b024c09fa
    
    
  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:
- `Awaitif- dhas a- `Manualinput source and awaits for more input. The client must use- srcto provide it.
- `Flush dif given output buffer- o(see- decoder) is full. The client must use- flushto completely flush- o.- dst_remgives you how many bytes it remains in- o.- 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 with- dst_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.