3 unstable releases

0.7.0 Jun 9, 2020
0.6.1 Feb 19, 2019
0.6.0 Feb 18, 2019

#94 in Compression

Download history 69/week @ 2021-04-11 43/week @ 2021-04-18 40/week @ 2021-04-25 29/week @ 2021-05-02 78/week @ 2021-05-09 58/week @ 2021-05-16 39/week @ 2021-05-23 44/week @ 2021-05-30 24/week @ 2021-06-06 33/week @ 2021-06-13 29/week @ 2021-06-20 29/week @ 2021-06-27 49/week @ 2021-07-04 62/week @ 2021-07-11 106/week @ 2021-07-18 108/week @ 2021-07-25

326 downloads per month

MIT license

27KB
330 lines

Crate Documentation

LZ4-compression

A pure Rust implementation of LZ4 compression and decompression. Currently, this implementation is not 100% compatible with the reference implementation. Pull requests are welcome though! This is based on redox-os' LZ4 compression, but has been gradually improved since then.

As this is only a passively maintained crate, consider using lz-fear instead, which also aims to be compatible with the reference implementation of LZ4.

Usage:

use lz4_compression::prelude::{ decompress, compress };

fn main(){
    let uncompressed_data: &[u8] = b"Hello world, what's up?";

    let compressed_data = compress(uncompressed_data);
    let decompressed_data = decompress(&compressed_data).unwrap();

    assert_eq!(uncompressed_data, decompressed_data.as_slice());
}

Thanks to all contributors

No runtime deps