[−][src]Trait absperf_minilzo::DecompressInto
Decompression trait. Implemented for [u8], allowing decompressing into [u8] and Vec<u8>
Required methods
fn decompress_into<'buffer>(
&self,
destination: &'buffer mut T
) -> Result<&'buffer [u8]>
&self,
destination: &'buffer mut T
) -> Result<&'buffer [u8]>
LZO1X decompresses into destination, returning a subslice of the decompressed data
Implementations on Foreign Types
impl DecompressInto<[u8]> for [u8]
[src]
fn decompress_into<'buffer>(
&self,
destination: &'buffer mut [u8]
) -> Result<&'buffer [u8]>
[src]
&self,
destination: &'buffer mut [u8]
) -> Result<&'buffer [u8]>
impl DecompressInto<Vec<u8>> for [u8]
[src]
fn decompress_into<'buffer>(
&self,
destination: &'buffer mut Vec<u8>
) -> Result<&'buffer [u8]>
[src]
&self,
destination: &'buffer mut Vec<u8>
) -> Result<&'buffer [u8]>
Decompresses into the indicated vector, automatically resizing it to fit the result. This can be pretty inefficient. It first ensures that the vector's capacity matches the input size, and repeatedly tries to decompress into the vector, doubling the size each time until successful. If you want to avoid this, ensure that your vector has sufficient capacity. If you can know the decompressed size ahead of time, or can safely guess large enough, you can avoid any unnecessary wasted work.