Skip to main content

compress_stream

Function compress_stream 

Source
pub fn compress_stream<S>(input: S, coding: Coding) -> Result<RequestStream>
where S: Stream<Item = Result<Bytes>> + Send + 'static,
Expand description

Compress a streaming request body as its chunks arrive.

There is no compressed length to declare before the body ends, so the result goes out chunked. The encoder buffers on its own terms, so the bytes for one chunk the caller writes need not leave with it.