pub fn uncompress(&self, src: &[u8]) -> Result<Option<Vec<u8>>, CompressionError> {
        match *self {
            Compression::None => Ok(None),
            Compression::Gzip => {
                let output = gzip::uncompress(src)?;
                Ok(Some(output))
            }
            Compression::Snappy => {
                let output = snappy::uncompress(src)?;
                Ok(Some(output))
            }
            Compression::Lz4 => {
                let output = lz4::uncompress(src)?;
                Ok(Some(output))
            }
        }
    }
/// Uncompresss the given data, returning the uncompressed data if any compression was applied, otherwise returns None
Uncompresss the given data, returning the uncompressed data if any compression was applied, otherwise returns None
Uncompresss the given data returning the uncompressed data if any compression was applied otherwise returns None
pub fn uncompress(&self, src: &[u8]) -> Result<Option<Vec<u8>>, CompressionError> {
        match *self {
            Compression::None => Ok(None),
            Compression::Gzip => {
                let output = gzip::uncompress(src)?;
                Ok(Some(output))
            }
            Compression::Snappy => {
                let output = snappy::uncompress(src)?;
                Ok(Some(output))
            }
            Compression::Lz4 => {
                let output = lz4::uncompress(src)?;
                Ok(Some(output))
            }
        }
    }
pub fn uncompress ( & self , src : & [ u8 ] ) -> Result < Option < Vec < u8 > > , CompressionError > { match * self { Compression :: None => Ok ( None ) , Compression :: Gzip => { let output = gzip :: uncompress ( src ) ? ; Ok ( Some ( output ) ) } Compression :: Snappy => { let output = snappy :: uncompress ( src ) ? ; Ok ( Some ( output ) ) } Compression :: Lz4 => { let output = lz4 :: uncompress ( src ) ? ; Ok ( Some ( output ) ) } } }
Uncompresss the given data, returning the uncompressed data if any compression was applied, otherwise returns None
Uncompresss the given data returning the uncompressed data if any compression was applied otherwise returns None
&self
src
&[u8]
&self
src
&[u8]