0% found this document useful (0 votes)
158 views

Presented By:: Huffman Coding

Huffman coding is a type of data compression algorithm that is used to compress lossless data. It builds a prefix-free coding tree based on the frequency of symbols in a piece of data, assigning shorter codes to more frequent symbols. The summary describes the Huffman coding process, including building a Huffman tree based on letter frequencies, assigning binary codes to each letter based on the tree, and compressing the data by 133 bits compared to the original letter frequency table. Huffman coding provides efficient lossless compression but requires two passes of the data for encoding and decoding.

Uploaded by

Nahim
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views

Presented By:: Huffman Coding

Huffman coding is a type of data compression algorithm that is used to compress lossless data. It builds a prefix-free coding tree based on the frequency of symbols in a piece of data, assigning shorter codes to more frequent symbols. The summary describes the Huffman coding process, including building a Huffman tree based on letter frequencies, assigning binary codes to each letter based on the tree, and compressing the data by 133 bits compared to the original letter frequency table. Huffman coding provides efficient lossless compression but requires two passes of the data for encoding and decoding.

Uploaded by

Nahim
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

1

HUFFMAN CODING

Presented by:
Name: Nahim Ahmed Rimon
Student ID: 182002032
Section: DB

Department Of Computer Science & Engineering


2
What is Huffman coding?

 Huffman code is a particular type of optimal prefix code that


is commonly used for lossless data compression.

 The process of finding or using such a code proceeds by


means of Huffman coding.
3
Process Of Huffman Coding

Letter Z K M C U D L E

Frequency 2 7 24 32 37 42 42 120

 Here a Letter freqency table.


 Where every letter has different values or weight.
 So the goal is to build a tree with the minimum external path weight.
4
Huffman Tree

 Here we put the small weights at the left and big


weights at the right and combine themselves as
criteria.
 After combining all of it we declare the left paths
as 0 and right paths as 1.
5
Huffman Code

Letter Freq Code Bits

E 120 0 1
 Here is the bits what we get from the Huffman
D 42 101 3
tree.
L 42 110 3
 The total frequncey of the letter frequency table
U 37 100 3
is 918
C 32 1110 4
 After using Huffman it compressed by 785
M 24 11111 5
which is mean 133 less bits.
K 7 111101 6

Z 2 111100 6
Advantage and Disadvantage of Huffman 6
Coding

Advantage
 Efficient method of compressing data without losing information.
 Maximum compression ratio assuming correct probabilities of
occurrence.
Disadvantages
 Need two passes for encoder and decoder.
 One to create the frequency distribution.
 One to encode/decode the data.
Thank you
All very much for listening

You might also like