An implementation of Huffman Coding in C++ using threads and FastFlow.
- READ: Read the input file and store it into a string object;
- COUNT: Count the frequency of each character;
- TREE: Build the Huffman tree;
- MAP: Build the Huffman map (char->code);
- ENCODE: Encode the input file using Huffman map;
- ASCII: Encode the obtained binary string in ASCII;
- WRITE: Write the encoded file;
Sequential version:
g++ -O3 -I /usr/local/include -std=c++17 src/*.cpp tests/test_1_sequential.cpp -o main
Thread version:
g++ -O3 -I /usr/local/include -std=c++17 src/*.cpp tests/test_2_thread.cpp -o main
FastFlow version:
g++ -O3 -I /usr/local/include -std=c++17 src/*.cpp tests/test_3_fastflow.cpp -o main