huff-tree-tap

Crates.iohuff-tree-tap
lib.rshuff-tree-tap
version0.0.5
sourcesrc
created_at2021-05-12 13:01:04.0316
updated_at2024-08-27 16:38:25.879314
descriptionHuffman Encoder and Decoder Library
homepage
repositoryhttps://github.com/chimbosonic/huff-tree-tap/
max_upload_size
id396513
size32,589
Alexis Lowe (chimbosonic)

documentation

README

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);

Commit count: 20

cargo fmt