Function fastlz::decompress[][src]

pub fn decompress<'a>(
    input: &[u8],
    output: &'a mut [u8]
) -> Result<&'a mut [u8], ()>

Decompress a block of compressed data and returns the size of the decompressed block. If error occurs, e.g. the compressed data is corrupted or the output buffer is not large enough, then 0 (zero) will be returned instead.

The input buffer and the output buffer can not overlap.

Decompression is memory safe and guaranteed not to write the output buffer more than what is specified in maxout.