pub fn decompress(
        &mut self,
        data: &[u8],
        capacity: usize,
    ) -> io::Result<Vec<u8>> {
        let mut buffer = Vec::with_capacity(capacity);
        unsafe {
            buffer.set_len(capacity);
            let len = self.decompress_to_buffer(data, &mut buffer[..])?;
            buffer.set_len(len);
        }
        Ok(buffer)
    }
/// Decompress a block of data, and return the result in a `Vec<u8>`.
///
/// The decompressed data should be less than `capacity` bytes,
/// or an error will be returned.
Decompress a block of data, and return the result in a `Vec`.
The decompressed data should be less than `capacity` bytes,
or an error will be returned.
Decompress a block of data and return the result in a ` Vec ` . The decompressed data should be less than ` capacity ` bytes or an error will be returned .
pub fn decompress(
        &mut self,
        data: &[u8],
        capacity: usize,
    ) -> io::Result<Vec<u8>> {
        let mut buffer = Vec::with_capacity(capacity);
        unsafe {
            buffer.set_len(capacity);
            let len = self.decompress_to_buffer(data, &mut buffer[..])?;
            buffer.set_len(len);
        }
        Ok(buffer)
    }
pub fn decompress ( & mut self , data : & [ u8 ] , capacity : usize , ) -> io :: Result < Vec < u8 > > { let mut buffer = Vec :: with_capacity ( capacity ) ; unsafe { buffer . set_len ( capacity ) ; let len = self . decompress_to_buffer ( data , & mut buffer [ .. ] ) ? ; buffer . set_len ( len ) ; } Ok ( buffer ) }
Decompress a block of data, and return the result in a `Vec<u8>`.
Decompress a block of data and return the result in a ` Vec<u8 > ` .
&mut self
data
&[u8]
capacity
usize
&mut self
data
&[u8]
capacity
usize