Skip to main content

StreamingCompressionProvider

Trait StreamingCompressionProvider 

Source
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§

Source

fn decompress_stream(&self, reader: BoxedAsyncBufRead) -> BoxedAsyncRead

Create a streaming decompressor.

Returns an AsyncRead that decompresses data from the input reader.

Source

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§

Source§

impl StreamingCompressionProvider for GzipProvider

Available on crate feature gzip only.
Source§

impl StreamingCompressionProvider for ZstdProvider

Available on crate feature zstd only.