#include #include "HuffmanEncoder.h" #include "RunLengthEncoder.h" void test_run_length_encoder() { std::string test_data = "BCAAAADDDCCACACAC"; RunLengthEncoder encoder; auto encoded = encoder.encode(test_data); std::cout << "Encoded: " << encoded << std::endl; auto decoded = encoder.decode(encoded); std::cout << "Decoded: " << decoded << std::endl; } void test_huffman_encoder() { //std::string testData = "BCAADDDCCACACAC"; //std::vector stream(testData.begin(), testData.end()); std::unordered_map counts; counts['A'] = 1; counts['B'] = 1; counts['C'] = 1; counts['D'] = 2; counts['E'] = 3; counts['F'] = 5; counts['G'] = 5; counts['H'] = 12; HuffmanEncoder encoder; encoder.encode(counts); } int main() { test_huffman_encoder(); //test_run_length_encoder(); return 0; }