Huffman compression and decompression implemented in rust
Go to file
2022-10-27 23:17:47 +02:00
.github/workflows Create rust.yml 2022-10-25 15:12:56 +02:00
assets ok 2022-10-27 23:17:47 +02:00
benches format 2022-10-26 12:01:41 +02:00
src const node new 2022-10-26 15:38:05 +02:00
.gitignore initial commit 2022-10-25 13:08:26 +02:00
Cargo.toml const node new 2022-10-26 15:38:05 +02:00
LICENSE-APACHE Create LICENSE-APACHE 2022-10-25 13:14:20 +02:00
LICENSE-MIT Create LICENSE-MIT 2022-10-25 13:14:59 +02:00
README.md improve docs 2022-10-26 11:14:48 +02:00

rustyman

Version Downloads License Rust Docs

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