Crates.io | huff_rs |
lib.rs | huff_rs |
version | 0.1.3 |
source | src |
created_at | 2021-03-01 14:48:06.283677 |
updated_at | 2021-03-02 23:58:30.111179 |
description | Encode and decode files with Huffman coding. |
homepage | |
repository | https://github.com/Treeniks/huff_rs |
max_upload_size | |
id | 362219 |
size | 24,642 |
This program was created as a fun project of mine after having to implement Huffman coding for a university project. It utilizes the bitvec crate to create the bitsequences. The performance of this program is honestly pretty bad, I have yet to do further analysis on that. The file format for the compressed files is something I came up with, so afaik it doesn't conform to any standard (if there even is one).
huff_rs 1.0
Thomas Lindae <thomas.lindae@in.tum.de>
Compresses files with huffman encoding
USAGE:
huff_rs <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
decode Decodes the specified file
encode Encodes the specified file
help Prints this message or the help of the given subcommand(s)
It's best to use cargo to install huff_rs
:
cargo install huff_rs
To build huff_rs
:
git clone https://github.com/Treeniks/huff_rs
cd huff_rs
cargo build --release
./target/release/huff_rs --version
To encode a file:
huff_rs encode file.txt
The default output filename will be the same as the input with the extension replaced by .huff
.
You can also specify the output filename with -o
:
huff_rs encode file.txt -o compressed.huff
To decode a file:
huff_rs decode file.huff
The default output filename will be the same as the input with the extension replaced by .txt
.
You can also specify the output filename with -o
:
huff_rs decode file.huff -o original.txt
There is 2 main things that this project still needs: