<prompt> Andika programu ya C inayotekelezea algoriti ya msingi ya usimbaji ya Huffman ya kubana na kupunguza faili za maandishi.PLINFORMAT  <response>: pamoja na pamoja na pamoja na jumuisha pamoja na darasa la HuffmanNode umma: data ya char; int frequency; HuffmanNode kushoto; HuffmanNode kulia; HuffmanNodechar data, int frequency : datadata, frequencyfrequency, leftnullptr, kulianullptr ;muundo CompareFrequency opereta boolHuffmanNode a, HuffmanNode b rudisha a-frequency b-frequency; ;void generateHuffmanCodesHuffmanNode root, std::string code, std::unordered_map huffmanCodes ikiwa mzizi nullptr kurudi; ikiwa !mzizi-kushoto !mzizi-kulia huffmanCodesroot-data msimbo; generateHuffmanCodesroot-left, code 0, huffmanCodes; generateHuffmanCodesroot-right, code 1, huffmanCodes;std::string compressstd::string inputText, std::unordered_map huffmanCodes std::string compressedText ; kwa char c: inputText CompressedText huffmanCodesc; kurudi CompressedText;std::string decompressstd::string compressedText, HuffmanNode root std::string decompressedText ; HuffmanNode currentNode mzizi; kwa char bit : compressedText ikiwa kidogo 0 currentNode currentNode-left; mwingine currentNode currentNode-kulia; ikiwa !currentNode-kushoto !currentNode-kulia decompressedText currentNode-data; currentNode mzizi; kurudi DecompressedText;int main std::string inputText Hili ni jaribio la algoriti ya usimbaji ya Huffman.; Kuhesabu mzunguko wa kila mhusika std::unordered_map masafa; kwa char c: inputText masafac; Unda foleni ya kipaumbele ili kuhifadhi nodi kulingana na mzunguko wao std::priority_queue, CompareFrequency minHeap; kwa jozi otomatiki: masafa minHeap.pushHuffmanNode mpyajozi.kwanza, jozi.pili; Jenga mti wa Huffman wakati minHeap.size 1 HuffmanNode kushoto minHeap.top; minHeap.pop; HuffmanNode kulia minHeap.top; minHeap.pop; int sum left-frequency right-frequency; HuffmanNode newNode HuffmanNode mpya0, jumla; newNode-left kushoto; newNode-kulia kulia; minHeap.pushNode mpya; Tengeneza misimbo ya Huffman kutoka kwa mti HuffmanNode mzizi minHeap.top; std::unordered_map huffmanCodes; kuzalishaHuffmanCodesmizizi, , huffmanCodes; Finyaza maandishi ya kuingiza kwa kutumia misimbo ya Huffman iliyotolewa std::string compressedText compressinputText, huffmanCodes; std::cout Nakala Iliyobanwa: CompressedText std::endl; Punguza maandishi yaliyobanwa kurudi kwa maandishi asili std::string decompressedText decompresscompressedText, root; std::cout Nakala Iliyopunguzwa: decompressedText std::endl; kurudi 0; 