pub trait CompressionAlgorithm {
    // Required method
    fn write_to<W: Write>(
        &mut self,
        writer: &mut W,
        bytes: &[u8]
    ) -> Result<u64, Error>;
}
Expand description

An algorithm used for compression

Required Methods§

source

fn write_to<W: Write>( &mut self, writer: &mut W, bytes: &[u8] ) -> Result<u64, Error>

The algorithm writes data directly into the writer. It returns the total number of bytes written.

Implementors§