[][src]Function lz_fear::decompress::decompress_raw

pub fn decompress_raw(
    input: &[u8],
    prefix: &[u8],
    output: &mut Vec<u8>
) -> Result<(), DecodeError>

Decompress an LZ4-compressed block.

Note that LZ4 heavily relies on a lookback mechanism where bytes earlier in the output stream are referenced. You may either pre-initialize the output buffer with this data or pass it separately in prefix. In particular, an LZ4 "dictionary" should (probably) be implemented as a prefix because you obviously don't want the dictionary to appear at the beginning of the output.

This function is based around memory buffers because that's what LZ4 intends. If your blocks don't fit in your memory, you should use smaller blocks.