7 unstable releases (3 breaking)
0.4.1 | Jul 7, 2024 |
---|---|
0.4.0 | Mar 27, 2024 |
0.3.1 | Mar 21, 2024 |
0.2.0 | Mar 10, 2024 |
0.1.3 | Aug 10, 2023 |
#541 in Compression
36 downloads per month
225KB
3.5K
SLoC
[dependencies]
gdeflate = "0.3.0"
Use the compress
and decompress
functions to compress and decompress data.
use gdeflate::{CompressionLevel, Compressor, Decompressor};
let uncompressed_data = vec![0, 1, 2]; // your input data
let mut compressor = Compressor::new(CompressionLevel::Level12).unwrap();
let result = compressor.compress(&uncompressed_data, 65536).unwrap();
let mut decompressor = Decompressor::new().unwrap();
let reconstructed_data = decompressor.decompress(&result).unwrap();
assert_eq!(&uncompressed_data, &reconstructed_data);
🚨 Warning 🚨
This library is still experimental and only supports single-threaded compression and decompression at the moment.
Dependencies
~0.3–1MB
~22K SLoC