Question: using c++ BST and Heap: Huffman coding and decoding Huffman Encoding is one of the simplest algorithms to compress data. Even though it is very

using c++

BST and Heap: Huffman coding and decoding

Huffman Encoding is one of the simplest algorithms to compress data. Even though it is very old and simple, it is still widely used (example: in few stages of JPEG, MPEG etc.)

In this project you will implement Huffman Encoding and Decoding. You can read about it in the textbook, Wikipedia or any other tutorial.

Your system must accept a file and you need to form a binary (Huffman) tree for the same. During the construction of Huffman tree, use the priority queue to select nodes with smallest frequencies. Once you have constructed the tree, traverse the tree and create a dictionary of codewords (letter to code). Given any new sentences, your system must show how the sentence is converted to Huffman code and then decoded back to original sentence. Note that you must implement BST and Heap yourself and must not rely on any language libraries.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!