top of page
Search

Huffman coding

Mavis

Overview:

Huffman Coding is a source coding method considered as a variable word length Coding (VLC). In 1952, Huffman proposed a coding method, which constructed the code with the shortest average length of the heterogram based entirely on the probability of character occurrence. This method is sometimes considered the best encoding, and generally known as Huffman encoding. Huffman encoding, the main purpose of which is to maximize the saving of character (encoding) storage space according to the frequency of use.

One of the most important algorithm works is the root of the code tree. Binary Huffman coding procedure is as follows:


1. Sort => the probability of all source symbols => descending

2. Merge => add probabilities => the last two => a new symbol

3. Repeat step 1 and 2 => only one symbol (left)

4. Code assignment => assign 0 => the top branch

=> Assign 1 => the bottom branch


The following notes offer further details:




Week 3:

In this week, the input has been changed to be opened from file directly and the division of decode and encode for the txt section has been completed. The quantization for the audio part is stocked which would be worked on next week.


Week 4

The audio and image parts have been finished. However, the division of the encode and decode is failed because of the limitation of the input of array. The quantization for the image part is failed to be accessed from a function and is kind of slow since the number if symbols is too much which could be improved in the future.

 
 
 

Recent Posts

See All

Comentários


Post: Blog2_Post

©2021 by Data compression project. Proudly created with Wix.com

bottom of page