type src = [
`Channel of in_channel
`String of string
The type for input sources. With a
`Manual source the client must provide input with
`Channel source the client can safely discard
`Await case (with
decoder src ~o ~w is a decoder that inputs from
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:
`Manualinput source and awaits for more input. The client must use
srcto provide it.
`Flush dif given output buffer
decoder) is full. The client must use
flushto completely flush
dst_remgives you how many bytes it remains in
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
src d s j l provides
l bytes to read, starting at
s. This byte range is read by calls to
`Await is returned. To signal the end of input call the function with
l = 0.
val dst_rem : decoder -> int
dst_rem d is how many bytes it remains in given output buffer
val src_rem : decoder -> int
src_rem d is how many bytes it remains in given input buffer.
val flush : decoder -> unit
flush d provides
d with new output storage.
module Ns : sig ... end
A non-streamable implementation of the RFC 1951. It considers the input to be whole and is therefore able to save some time