Compressor

Trait Compressor 

Source
pub trait Compressor {
    // Required methods
    fn compress(&self, bytes: &[u8]) -> Result<Vec<u8>>;
    fn decompress(&self, bytes: &[u8]) -> Result<Vec<u8>>;
}
Expand description

Generic compression trait

Required Methods§

Source

fn compress(&self, bytes: &[u8]) -> Result<Vec<u8>>

Compresses a value

§Errors

Will return Err if an IO error occurs.

Source

fn decompress(&self, bytes: &[u8]) -> Result<Vec<u8>>

Decompresses a value

§Errors

Will return Err if an IO error occurs.

Implementors§