Skip to main content

Module stream

Module stream 

Source
Expand description

Streaming compression and decompression as standard std::io adapters.

Compressor is a Write that compresses everything written to it and forwards the result to an inner sink. Decompressor is a Read that decompresses from an inner source on demand. Both drive the C ABI’s fill-buffer / BUF_TOO_SMALL / drain protocol internally, so callers never see it.

Neither type is safe for concurrent use (each owns a non-thread-safe C stream handle).

Structs§

Compressor
A Write that compresses into an inner sink.
Decompressor
A Read that decompresses from an inner source.
IntoPartsError
Decompressor::into_parts before the stream ended and all of its output was read. into_inner returns the decompressor, which keeps reading where it left off.