/// Compress the given data, returning the compressed data
Compress the given data, returning the compressed data
Compress the given data returning the compressed data
pub fn compress(&self, src: &[u8]) -> Result<Vec<u8>, CompressionError> {
        match *self {
            Compression::None => Ok(src.to_vec()),
            Compression::Gzip => gzip::compress(src),
            Compression::Snappy => snappy::compress(src),
            Compression::Lz4 => lz4::compress(src),
        }
    }
pub fn compress ( & self , src : & [ u8 ] ) -> Result < Vec < u8 > , CompressionError > { match * self { Compression :: None => Ok ( src . to_vec ( ) ) , Compression :: Gzip => gzip :: compress ( src ) , Compression :: Snappy => snappy :: compress ( src ) , Compression :: Lz4 => lz4 :: compress ( src ) , } }
Compress the given data, returning the compressed data
Compress the given data returning the compressed data
&self
src
&[u8]