Yazi - Yet another zlib implementation
Yazi is a pure Rust implementation of the RFC 1950 DEFLATE specification with support for the zlib wrapper. It provides streaming compression and decompression.
Usage
Add this to your Cargo.toml
:
[]
= "0.1.1"
The following demonstrates simple usage for compressing and decompressing in-memory buffers:
use *;
// Your source data.
let data = &.cycle.take.;
// Compress it into a Vec<u8> with a zlib wrapper using the default compression level.
let compressed = compress.unwrap;
// Decompress it into a Vec<u8>.
let = decompress.unwrap;
// Verify the checksum.
assert_eq!;
// Verify that the decompressed data matches the original.
assert_eq!;
For detail on more advanced usage, see the full API documentation.