7 | --------------------------------------------------------------------------------
8 | -- Compresssor/Decompressor
9 | --------------------------------------------------------------------------------
11 | ||| Represents an initialized zlib compression stream owned by the
12 | ||| high-level compression API.
13 | |||
14 | ||| A `Compressor` is created only after zlib has successfully initialized
15 | ||| the underlying stream. It must therefore eventually be finalized with
16 | ||| `deflateEnd` and its native stream storage released.
17 | |||
23 | ||| Represents an initialized zlib decompression stream owned by the
24 | ||| high-level decompression API.
25 | |||
26 | ||| A `Decompressor` is created only after zlib has successfully initialized
27 | ||| the underlying stream. It must therefore eventually be finalized with
28 | ||| `inflateEnd` and its native stream storage released.
29 | |||
35 | ||| Describes the progress made by one zlib buffer operation.
36 | |||
37 | ||| `consumed` is the number of input bytes consumed by zlib and `produced`
38 | ||| is the number of bytes written to the supplied output buffer.
39 | |||
47 | --------------------------------------------------------------------------------
48 | -- Streaming
49 | --------------------------------------------------------------------------------
51 | ||| Result of incrementally compressing input.
52 | |||
53 | ||| `output` contains zero or more compressed chunks generated while consuming
54 | ||| the supplied input.
55 | |||
56 | ||| `finished` is true only after zlib has returned `Z_STREAM_END`.
57 | |||
65 | ||| Result of incrementally decompressing input.
66 | |||
67 | ||| `consumed` is the number of bytes consumed from the supplied input buffer.
68 | ||| This can be less than the input size when `Z_STREAM_END` is reached, allowing
69 | ||| the caller to retain trailing bytes or begin processing another stream.
70 | |||
71 | ||| `output` contains zero or more decompressed chunks.
72 | |||
73 | ||| `finished` is true when zlib returned `Z_STREAM_END`.
74 | |||