This is an Implementation for the huffman coding algorithm for lossless compression. This implementation is done on PGM greyscale photo files with some examples in the data folder.
To compile Project run the following command
g++ main.cpp huffman.cpp IOStream.cpp -o huffman
To Run the program for compression you should pass one argument (photo path) and you should have a folder in the pwd named
encoded
./huffman ./directory/filename.pgm
To Run the program for decompression you should pass two arguments (frequency table and compressed file) and you shold have a folder in the pwd named
decoded
./huffman ./encoded/filename.huf ./encoded/filename.frq
To compile project run the following commands
mkdir build
cd build
mkdir encoded decoded
cmake ..
make
To Run the program for compression you should pass one argument (photo path) and you should have a folder in the pwd named
encoded
./huffman ../data/filename.pgm
To Run the program for decompression you should pass two arguments (frequency table and compressed file) and you shold have a folder in the pwd named
decoded
./huffman ./encoded/filename.huf ./encoded/filename.frq
- The Console application is done.
This is part of the SBE201 course in the Systems and Biomedical Engineering Department - Cairo University
Dr.Ahmed Kandil
TA. Asem Alaa