Pure Rust, high performance implementation of LZ4 compression.
This is based on redox-os' lz4 compression. The redox implementation is quite slow with only around 300MB/s decompression, 200MB/s compression and the api ist quite limited. This shortcomings are addressed.
Usage: ```rust use lz4_compression::prelude::{ decompress, compress };
fn main(){ use lz4flex::{compressprependsize, decompresssizeprepended}; let input: &[u8] = b"Hello people, what's up?"; let compressed = compressprependsize(input); let uncompressed = decompresssizeprepended(&compressed).unwrap(); asserteq!(input, uncompressed); } ```
The benchmark is run with criterion on set of test files are in the folder benches.
Currently 3 implementations are compared, this one, the redox version and the c++ version via rust bindings
cargo bench
Executed on Macbook Pro 2017 i7
This fuzz target fuzzes, and asserts compression and decompression returns the original input.
cargo fuzz run fuzz_target_1
unsafe
version for decompression