5 releases

0.0.5 Aug 27, 2024
0.0.4 Feb 16, 2023
0.0.3 Nov 16, 2021
0.0.2 May 12, 2021
0.0.1 May 12, 2021

#241 in Compression

Download history 18/week @ 2024-07-29 142/week @ 2024-08-26 15/week @ 2024-09-16 5/week @ 2024-09-23 4/week @ 2024-09-30

219 downloads per month

MIT license

25KB
420 lines

Crate License Crate Downloads Crate Size Build

huff-tree-tap

Huffman Encoder and Decoder Library

Example usage

Cargo.toml:

[dependencies]
huff_tree_tap = "*" # You can specify a version here if you want
extern crate huff_tree_tap;
use  huff_tree_tap::*;
use std::collections::HashMap;

let data: Vec<u8> = "this is a test string!".to_string().into_bytes();
let huffman_data: HuffmanData = HuffmanData::new(&data).unwrap();
let decoded_data: Vec<u8> = huffman_data.decode().unwrap();
assert_eq!(decoded_data,data);

Dependencies

~0.7–1.6MB
~35K SLoC