A small tool to archive and extract files using Huffman coding
Briefly, the archiving process:
- Reads file
- Analyses symbols frequencies
- Reencodes symbols in the most economic way
- Writes header with frequencies table to output file
- Writes encoded symbols to output files
And extracting process:
- Reads file
- Parses the frequencies table from header
- Decode symbols
- Writes to output files
Usage: huffman (-c | -u) (-f | --file) input (-o | --output) output
-c for archiving
-u for extracting
-f or --file file to archive/extract
-o or --output file to write result