Compress and uncompress a text file using Huffman algorithm.
cd src/
javac *.java
java Main
Main [-ehuV] -i=<inputFile> -o=<outputFile>
-i, --input=<inputFile> Input file.
-o, --output=<outputFile> Output file.
-u, --uncompress Uncompress input file into output file.
-e, --extra Print compression rate, input and output file sizes.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
$ java Main -i text_file_to_compress.txt -o compressed_text_file.huff
Use -u to activate uncompress mode.
$ java Main -u -i compressed_text_file.huff -o uncompressed_text_file.txt
Use -e to print extras : characters (ascii value, frequency, Huffman code) and compression gain.
$ java Main -e -i text_file_to_compress.txt -o compressed_text_file.huff
$ java Main -ue -i compressed_text_file.huff -o uncompressed_text_file.txt