#lz4 #decompression #pull-request

lz4-compression

Pure Rust implementation of LZ4 compression and decompression as a library

3 unstable releases

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

#268 in Compression

Download history 94/week @ 2024-03-29 103/week @ 2024-04-05 74/week @ 2024-04-12 63/week @ 2024-04-19 56/week @ 2024-04-26 123/week @ 2024-05-03 159/week @ 2024-05-10 74/week @ 2024-05-17 108/week @ 2024-05-24 107/week @ 2024-05-31 51/week @ 2024-06-07 103/week @ 2024-06-14 87/week @ 2024-06-21 36/week @ 2024-06-28 40/week @ 2024-07-05 34/week @ 2024-07-12

206 downloads per month
Used in 3 crates

MIT license

28KB
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