The Huffman Archiver is a C++ project that implements file compression and decompression using the Huffman algorithm. The Huffman algorithm is a lossless data compression algorithm that assigns variable-length codes to different characters based on their frequency of occurrence in the input file.
- Compression: The archiver can compress a given input file by replacing frequently occurring characters with shorter codes, resulting in a smaller output file size.
- Decompression: The archiver can decompress a previously compressed file, restoring it to its original form.
-c: archiving-u: unzip-f,--file <-path>: input file name-o,--output <-path>: name of the result file
Compile project:
makeTo compress a file:
./huffman -c -f path/to/input_file -o path/to/output_fileTo decompress a file:
./huffman -u -f path/to/input_file -o path/to/output_fileThe program displays compression/decompression statistics: the size of the source data, the size of the received data and the size that was used to store auxiliary data in the output file (e.g. tables). No additional text should be output, just the sizes. All sizes are in bytes.