Huffman Coding An important requirement for a Huffman encoder and decoder to wor
ID: 3727165 • Letter: H
Question
Huffman Coding
An important requirement for a Huffman encoder and decoder to work together is that the code word dictionary, or “lookup table”, must be available to both encoder and decoder. Of course, the two must also be identical. There are two obvious approaches to this problem
One approach would be to rely on globally agreed statistics, and use the same code word dictionary for many communication sessions, either by communicating the code word dictionary once or have the encoder and decoder derive it based on the same probability data. What would be the advantages and disadvantages of this approach?
The second approach is to analyse the message (or file, or image, or whatever) we want to send, obtain the probability statistics for our symbol set, generate the optimum code word set for this data set, and send the dictionary along with the message. What would be the advantages and disadvantages of this approach?
Explanation / Answer
The advantages for the first technique is that since it uses global data for encoding each word it would perform better when using huffmann compression on large amount of data as it saves time to calculate the statistics. The statistics are already available application and Hence we already have the coding dictionary.
The second technique is better in the scenarios where we need compression to be upto a precise level as when we generate the statistics for a given dataset it gives us the best compression that could be achievable using this data. Though extra time is consumed for calculating the statistics. As in the first case the same level of compression cannot be achieved on all datasets.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.