pub trait StreamingCompressionProvider: CompressionProvider {
// Required methods
fn decompress_stream(&self, reader: BoxedAsyncBufRead) -> BoxedAsyncRead;
fn compress_stream(&self, reader: BoxedAsyncBufRead) -> BoxedAsyncRead;
}Available on crate feature
streaming only.Expand description
Trait for streaming compression support.
This trait extends CompressionProvider with streaming methods that
process data incrementally without buffering the entire payload in memory.
Available when the streaming feature is enabled (default).
Required Methods§
Sourcefn decompress_stream(&self, reader: BoxedAsyncBufRead) -> BoxedAsyncRead
fn decompress_stream(&self, reader: BoxedAsyncBufRead) -> BoxedAsyncRead
Create a streaming decompressor.
Returns an AsyncRead that decompresses data from the input reader.
Sourcefn compress_stream(&self, reader: BoxedAsyncBufRead) -> BoxedAsyncRead
fn compress_stream(&self, reader: BoxedAsyncBufRead) -> BoxedAsyncRead
Create a streaming compressor.
Returns an AsyncRead that compresses data from the input reader.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl StreamingCompressionProvider for GzipProvider
Available on crate feature
gzip only.impl StreamingCompressionProvider for ZstdProvider
Available on crate feature
zstd only.