[][src]Function lz4_flex::block::compress::compress_into_with_table

pub fn compress_into_with_table<T: HashTable>(
    input: &[u8],
    output: &mut Vec<u8>,
    dict: &mut T
) -> Result<usize>

Compress all bytes of input into output.

T:HashTable is the dictionary of previously encoded sequences.

This is used to find duplicates in the stream so they are not written multiple times.

Every four bytes are hashed, and in the resulting slot their position in the input buffer is placed. This way we can easily look up a candidate to back references.