Skip to main content

StreamingDecompressor

Trait StreamingDecompressor 

Source
pub trait StreamingDecompressor {
    // Required methods
    fn algorithm(&self) -> Algorithm;
    fn begin(&mut self) -> Result<()>;
    fn decompress_chunk(
        &mut self,
        input: &[u8],
        output: &mut [u8],
    ) -> Result<(usize, usize, bool)>;
    fn is_finished(&self) -> bool;
    fn reset(&mut self);
}
Expand description

Streaming decompression for incremental processing.

Required Methods§

Source

fn algorithm(&self) -> Algorithm

Get the decompression algorithm.

Source

fn begin(&mut self) -> Result<()>

Begin a new decompression stream.

Source

fn decompress_chunk( &mut self, input: &[u8], output: &mut [u8], ) -> Result<(usize, usize, bool)>

Decompress a chunk of data.

§Arguments
  • input - Compressed data chunk
  • output - Buffer for decompressed output
§Returns

Tuple of (bytes_read, bytes_written, is_finished).

Source

fn is_finished(&self) -> bool

Check if decompression is complete.

Source

fn reset(&mut self)

Reset decompressor state for reuse.

Implementors§