Rust Docs Crates.io

lz4_flex

lz4<em>flex</em>logo

Configurable, pure rust, high performance implementation of LZ4 compression with fast compile times.

Features

Usage:

```rust use lz4flex::{compressprependsize, decompresssize_prepended};

fn main(){ let input: &[u8] = b"Hello people, what's up?"; let compressed = compressprependsize(input); let uncompressed = decompresssizeprepended(&compressed).unwrap(); assert_eq!(input, uncompressed); } ```

Benchmarks

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

Results v0.3 18-10-2020

Executed on Macbook Pro 2017 i7

Compress

Decompress

Fuzzer

This fuzz target fuzzes, and asserts compression and decompression returns the original input. cargo fuzz run fuzz_roundtrip

This fuzz target fuzzes, and asserts compression with cpp and decompression returns the original input. cargo fuzz run fuzz_roundtrip_cpp_compress

TODO