mirror of
https://github.com/edg-l/rustyman.git
synced 2024-11-24 17:08:20 +00:00
.github/workflows | ||
assets | ||
benches | ||
src | ||
.gitignore | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |
rustyman
Huffman compression and decompression implemented in rust
Example
use rustyman::Huffman;
let payload = b"hello from the other side of the river";
let huffman = Huffman::new_from_data(payload);
let compressed = huffman.compress(payload);
let decompressed = huffman.decompress(&compressed);
assert!(compressed.len() < payload.len());
assert_eq!(&payload[..], decompressed);
License: MIT OR Apache-2.0