SlideShare a Scribd company logo
NationalInstituteofScienceandTechnology
[1]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
A Review of Data Compression Techniques
Presented
by
Sudeepta Mishra
Roll# CS200117052
At
NIST,Berhampur
Under the guidance of
Mr. Rowdra Ghatak
NationalInstituteofScienceandTechnology
[2]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
Introduction
• Data compression is the process of encoding data so
that it takes less storage space or less transmission time
than it would if it were not compressed.
• Compression is possible because most real-world data
is very redundant
NationalInstituteofScienceandTechnology
[3]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
Different Compression Techniques
• Mainly two types of data Compression techniques are
there.
– Loss less Compression.
Useful in spreadsheets, text, executable program
Compression.
– Lossy less Compression.
Compression of images, movies and sounds.
NationalInstituteofScienceandTechnology
[4]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
Types of Loss less data Compression
• Dictionary coders.
– Zip (file format).
– Lempel Ziv.
• Entropy encoding.
– Huffman coding (simple entropy coding).
• Run-length encoding.
NationalInstituteofScienceandTechnology
[5]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
Dictionary-Based Compression
• Dictionary-based algorithms do not encode
single symbols as variable-length bit strings;
they encode variable-length strings of symbols
as single tokens.
• The tokens form an index into a phrase
dictionary.
• If the tokens are smaller than the phrases
they replace, compression occurs.
NationalInstituteofScienceandTechnology
[6]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
Types of Dictionary
• Static Dictionary.
• Semi-Adaptive Dictionary.
• Adaptive Dictionary.
– Lempel Ziv algorithms belong to this category of
dictionary coders. The dictionary is being built in a
single pass, while at the same time encoding the data.
– The decoder can build up the dictionary in the same
way as the encoder while decompressing the data.
NationalInstituteofScienceandTechnology
[7]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
• Using a English Dictionary the string:
“A good example of how dictionary based compression works”
• Gives : 1/1 822/3 674/4 1343/60 928/75 550/32 173/46 421/2
• Using the dictionary as lookup table, each word is coded as
x/y, where, x gives the page no. and y gives the number of
the word on that page. If the dictionary has 2,200 pages
with less than 256 entries per page: Therefore x requires 12
bits and y requires 8 bits, i.e., 20 bits per word (2.5 bytes per
word). Using ASCII coding the above string requires 48
bytes, whereas our encoding requires only 20 (<-2.5 * 8)
bytes: 50% compression.
Dictionary-Based Compression: Example
NationalInstituteofScienceandTechnology
[8]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
Lempel Ziv
• It is a family of algorithms, stemming from the two
algorithms proposed by Jacob Ziv and Abraham Lempel in
their landmark papers in 1977 and 1978.
LZ77 LZ78
LZR
LZHLZSS LZB
LZFG
LZC LZT LZMW
LZW
LZJ
NationalInstituteofScienceandTechnology
[9]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
LZW Algorithm
• It is An improved version of LZ78 algorithm.
• Published by Terry Welch in 1984.
• A dictionary that is indexed by “codes” is used.
The dictionary is assumed to be initialized with
256 entries (indexed with ASCII codes 0 through
255) representing the ASCII table.
NationalInstituteofScienceandTechnology
[10]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Compression)
W = NIL;
while (there is input){
K = next symbol from input;
if (WK exists in the dictionary) {
W = WK;
} else {
output (index(W));
add WK to the dictionary;
W = K;
}
}
NationalInstituteofScienceandTechnology
[11]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Compression) Flow Chart
START
W= NULL
IS EOF
?
K=NEXT INPUT
IS WK
FOUND?
W=WK
OUTPUT INDEX OF W
ADD WK TO DICTIONARY
STOP
W=K
YES
NO
YES
NO
NationalInstituteofScienceandTechnology
[12]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Compression) Example
• Input string is
• The Initial
Dictionary
contains symbols
like
a, b, c, d with their
index values as 1, 2,
3, 4 respectively.
• Now the input string
is read from left to
right. Starting from
a.
a b d c a d a c
a 1
b 2
c 3
d 4
NationalInstituteofScienceandTechnology
[13]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Compression) Example
• W = Null
• K = a
• WK = a
In the dictionary.
a b d c a d a c
a 1
b 2
c 3
d 4
K
NationalInstituteofScienceandTechnology
[14]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Compression) Example
• K = b.
• WK = ab
is not in the dictionary.
• Add WK to
dictionary
• Output code for a.
• Set W = b
a b d c a d a c
K
1
ab 5a 1
b 2
c 3
d 4
NationalInstituteofScienceandTechnology
[15]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Compression) Example
• K = d
• WK = bd
Not in the dictionary.
Add bd to dictionary.
• Output code b
• Set W = d
a b d c a d a c
1
K
2
ab 5a 1
b 2
c 3
d 4
bd 6
NationalInstituteofScienceandTechnology
[16]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Compression) Example
• K = a
• WK = da
not in the dictionary.
• Add it to dictionary.
• Output code d
• Set W = a
a b d a b d a c
1
K
2 4
ab 5a 1
b 2
c 3
d 4
bd 6
da 7
NationalInstituteofScienceandTechnology
[17]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Compression) Example
• K = b
• WK = ab
It is in the dictionary.
a b d a b d a c
1
K
2 4
ab 5a 1
b 2
c 3
d 4
bd 6
da 7
NationalInstituteofScienceandTechnology
[18]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Compression) Example
• K = d
• WK = abd
Not in the dictionary.
• Add W to the
dictionary.
• Output code for W.
• Set W = d
a b d a b d a c
1
K
2 4 5
ab 5a 1
b 2
c 3
d 4
bd 6
da 7
abd 8
NationalInstituteofScienceandTechnology
[19]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Compression) Example
• K = a
• WK = da
In the dictionary.
a b d a b d a c
1
K
2 4 5
ab 5a 1
b 2
c 3
d 4
bd 6
da 7
abd 8
NationalInstituteofScienceandTechnology
[20]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Compression) Example
• K = c
• WK = dac
Not in the dictionary.
• Add WK to the
dictionary.
• Output code for W.
• Set W = c
• No input left so
output code for W.
a b d a b d a c
1
K
2 4 5
ab 5a 1
b 2
c 3
d 4
bd 6
da 7
abd 8
7
dac 9
NationalInstituteofScienceandTechnology
[21]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Compression) Example
• The final output
string is
1 2 4 5 7 3
• Stop.
cadbadba
1
K
2 4 5
5ab
4d
3c
2b
1a
6bd
7da
8abd
7
9dac
3
NationalInstituteofScienceandTechnology
[22]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
LZW Decompression Algorithm
read a character k;
output k;
w = k;
while ( read a character k )
/* k could be a character or a code. */
{ entry = dictionary entry for k;
output entry;
add w + entry[0] to dictionary;
w = entry; }
NationalInstituteofScienceandTechnology
[23]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
LZW Decompression Algorithm Flow Chart
START
Output K
IS EOF
?
K=NEXT INPUT
ENTRY=DICTIONARY INDEX (K)
ADD W+ENTRY[0] TO DICTIONARY
STOP
W=ENTRY
K=INPUT
W=K
YES
NO
Output ENTRY
NationalInstituteofScienceandTechnology
[24]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Decompression) Example
• K = 1
• Out put K (i.e. a)
• W = K
1
K
2 4 5
4d
3c
2b
1a
7 3
a
NationalInstituteofScienceandTechnology
[25]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Decompression) Example
• K = 2
• entry = b
• Output entry
• Add W + entry[0] to
dictionary
• W = entry[0] (i.e. b)
1
K
2 4 5
4d
3c
2b
1a
7 3
a b
5ab
NationalInstituteofScienceandTechnology
[26]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Decompression) Example
• K = 4
• entry = d
• Output entry
• Add W + entry[0] to
dictionary
• W = entry[0] (i.e. d)
1
K
2 4 5
4d
3c
2b
1a
7 3
a b
5ab
6bd
d
NationalInstituteofScienceandTechnology
[27]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Decompression) Example
• K = 5
• entry = ab
• Output entry
• Add W + entry[0] to
dictionary
• W = entry[0] (i.e. a)
1
K
2 4 5
4d
3c
2b
1a
7 3
a b
5ab
6bd
d a b
7da
NationalInstituteofScienceandTechnology
[28]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Decompression) Example
• K = 7
• entry = da
• Output entry
• Add W + entry[0] to
dictionary
• W = entry[0] (i.e. d)
1
K
2 4 5
4d
3c
2b
1a
7 3
a b
5ab
6bd
d a b
7da
d a
8abd
NationalInstituteofScienceandTechnology
[29]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
The LZW Algorithm (Decompression) Example
• K = 3
• entry = c
• Output entry
• Add W + entry[0] to
dictionary
• W = entry[0] (i.e. c)
1
K
2 4 5
4d
3c
2b
1a
7 3
a b
5ab
6bd
d a b
7da
d a
8abd
c
9dac
NationalInstituteofScienceandTechnology
[30]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
Advantages
• As LZW is adaptive dictionary coding no need to
transfer the dictionary explicitly.
• It will be created at the decoder side.
• LZW can be made really fast, it grabs a fixed number
of bits from input, so bit parsing is very easy, and table
look up is automatic.
NationalInstituteofScienceandTechnology
[31]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
Problems with the encoder
• What if we run out of space?
– Keep track of unused entries and use LRU (Last
Recently Used).
– Monitor compression performance and flush
dictionary when performance is poor.
NationalInstituteofScienceandTechnology
[32]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
Conclusion
• LZW has given new dimensions for the development of
new compression techniques.
• It has been implemented in well known compression
format like Acrobat PDF and many other types of
compression packages.
• In combination with other compression techniques
many other different compression techniques are
developed like LZMS.
NationalInstituteofScienceandTechnology
[33]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
REFERENCES
[1] http://www.bambooweb.com/articles/d/a/Data_Compression.html
[2] http://tuxtina.de/files/seminar/LempelZivReport.pdf
[3] BELL, T. C., CLEARY, J. G., AND WITTEN, I. H. Text
Compression. Prentice Hall, Upper Sadle River, NJ, 1990.
[4] http://www.cs.cf.ac.uk/Dave/Multimedia/node214.html
[5] http://download.cdsoft.co.uk/tutorials/rlecompression/Run-
Length Encoding (RLE) Tutorial.htm
[6] David Salomon, Data Compression The Complete Reference,
Second Edition. Springer-Verlac, New York, Inc, 2001 reprint.
[7] http://www.programmersheaven.com/2/Art_Huffman_p1.htm
[8] http://www.programmersheaven.com/2/Art_Huffman_p2.htm
[9] Khalid Sayood, Introduction to Data Compression Second
Edition, Chapter 5, pp. 137-157, Harcourt India Private Limited.
NationalInstituteofScienceandTechnology
[34]
Technical Seminar Presentation 2005
Sudeepta Mishra
NationalInstituteofScienceandTechnology
Sudeepta Mishra CS200117052
Thank You

More Related Content

What's hot

Assembly Language -I
Assembly Language -IAssembly Language -I
Assembly Language -I
Devika Rangnekar
 
Cody Roux - Pure Type Systems - Boston Haskell Meetup
Cody Roux - Pure Type Systems - Boston Haskell MeetupCody Roux - Pure Type Systems - Boston Haskell Meetup
Cody Roux - Pure Type Systems - Boston Haskell Meetup
Greg Hale
 
Lecture 3 RE NFA DFA
Lecture 3   RE NFA DFA Lecture 3   RE NFA DFA
Lecture 3 RE NFA DFA
Rebaz Najeeb
 
0015.register allocation-graph-coloring
0015.register allocation-graph-coloring0015.register allocation-graph-coloring
0015.register allocation-graph-coloring
sean chen
 
The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)
The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)
The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)
Peter Breuer
 
Declarative Semantics Definition - Term Rewriting
Declarative Semantics Definition - Term RewritingDeclarative Semantics Definition - Term Rewriting
Declarative Semantics Definition - Term Rewriting
Guido Wachsmuth
 
Introduction - Imperative and Object-Oriented Languages
Introduction - Imperative and Object-Oriented LanguagesIntroduction - Imperative and Object-Oriented Languages
Introduction - Imperative and Object-Oriented Languages
Guido Wachsmuth
 
20141204.journal club
20141204.journal club20141204.journal club
20141204.journal club
Hayaru SHOUNO
 
Optimization of dfa
Optimization of dfaOptimization of dfa
Optimization of dfa
Kiran Acharya
 
Register allocation and assignment
Register allocation and assignmentRegister allocation and assignment
Register allocation and assignment
Karthi Keyan
 
Assembly language (addition and subtraction)
Assembly language (addition and subtraction)Assembly language (addition and subtraction)
Assembly language (addition and subtraction)
Muhammad Umar Farooq
 
Cfg part i
Cfg   part iCfg   part i
Cfg part i
Kashif Ali
 
Optimizing Set-Similarity Join and Search with Different Prefix Schemes
Optimizing Set-Similarity Join and Search with Different Prefix SchemesOptimizing Set-Similarity Join and Search with Different Prefix Schemes
Optimizing Set-Similarity Join and Search with Different Prefix Schemes
HPCC Systems
 
Lexicalanalyzer
LexicalanalyzerLexicalanalyzer
Lexicalanalyzer
Royalzig Luxury Furniture
 
St Petersburg R user group meetup 2, Parallel R
St Petersburg R user group meetup 2, Parallel RSt Petersburg R user group meetup 2, Parallel R
St Petersburg R user group meetup 2, Parallel R
Andrew Bzikadze
 
Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,
Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,
Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,
paperpublications3
 
Certified bit coded regular expression parsing
Certified bit coded regular expression parsingCertified bit coded regular expression parsing
Certified bit coded regular expression parsing
rodrigogribeiro
 
Lecture4 lexical analysis2
Lecture4 lexical analysis2Lecture4 lexical analysis2
Lecture4 lexical analysis2
Mahesh Kumar Chelimilla
 
Term Rewriting
Term RewritingTerm Rewriting
Term Rewriting
Eelco Visser
 
Cs6660 compiler design may june 2017 answer key
Cs6660 compiler design may june 2017  answer keyCs6660 compiler design may june 2017  answer key
Cs6660 compiler design may june 2017 answer key
appasami
 

What's hot (20)

Assembly Language -I
Assembly Language -IAssembly Language -I
Assembly Language -I
 
Cody Roux - Pure Type Systems - Boston Haskell Meetup
Cody Roux - Pure Type Systems - Boston Haskell MeetupCody Roux - Pure Type Systems - Boston Haskell Meetup
Cody Roux - Pure Type Systems - Boston Haskell Meetup
 
Lecture 3 RE NFA DFA
Lecture 3   RE NFA DFA Lecture 3   RE NFA DFA
Lecture 3 RE NFA DFA
 
0015.register allocation-graph-coloring
0015.register allocation-graph-coloring0015.register allocation-graph-coloring
0015.register allocation-graph-coloring
 
The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)
The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)
The mixed-signal modelling language VHDL-AMS and its semantics (ICNACSA 1999)
 
Declarative Semantics Definition - Term Rewriting
Declarative Semantics Definition - Term RewritingDeclarative Semantics Definition - Term Rewriting
Declarative Semantics Definition - Term Rewriting
 
Introduction - Imperative and Object-Oriented Languages
Introduction - Imperative and Object-Oriented LanguagesIntroduction - Imperative and Object-Oriented Languages
Introduction - Imperative and Object-Oriented Languages
 
20141204.journal club
20141204.journal club20141204.journal club
20141204.journal club
 
Optimization of dfa
Optimization of dfaOptimization of dfa
Optimization of dfa
 
Register allocation and assignment
Register allocation and assignmentRegister allocation and assignment
Register allocation and assignment
 
Assembly language (addition and subtraction)
Assembly language (addition and subtraction)Assembly language (addition and subtraction)
Assembly language (addition and subtraction)
 
Cfg part i
Cfg   part iCfg   part i
Cfg part i
 
Optimizing Set-Similarity Join and Search with Different Prefix Schemes
Optimizing Set-Similarity Join and Search with Different Prefix SchemesOptimizing Set-Similarity Join and Search with Different Prefix Schemes
Optimizing Set-Similarity Join and Search with Different Prefix Schemes
 
Lexicalanalyzer
LexicalanalyzerLexicalanalyzer
Lexicalanalyzer
 
St Petersburg R user group meetup 2, Parallel R
St Petersburg R user group meetup 2, Parallel RSt Petersburg R user group meetup 2, Parallel R
St Petersburg R user group meetup 2, Parallel R
 
Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,
Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,
Design and Implementation of Area Efficiency AES Algoritham with FPGA and ASIC,
 
Certified bit coded regular expression parsing
Certified bit coded regular expression parsingCertified bit coded regular expression parsing
Certified bit coded regular expression parsing
 
Lecture4 lexical analysis2
Lecture4 lexical analysis2Lecture4 lexical analysis2
Lecture4 lexical analysis2
 
Term Rewriting
Term RewritingTerm Rewriting
Term Rewriting
 
Cs6660 compiler design may june 2017 answer key
Cs6660 compiler design may june 2017  answer keyCs6660 compiler design may june 2017  answer key
Cs6660 compiler design may june 2017 answer key
 

Viewers also liked

Taxonomy of Differential Compression
Taxonomy of Differential CompressionTaxonomy of Differential Compression
Taxonomy of Differential Compression
Liwei Ren任力偉
 
Quantization
QuantizationQuantization
Quantization
wtyru1989
 
Introduction for Data Compression
Introduction for Data Compression Introduction for Data Compression
Introduction for Data Compression
MANISH T I
 
Vector quantization
Vector quantizationVector quantization
Vector quantization
Rajani Sharma
 
Audio compression
Audio compressionAudio compression
Audio compression
Madhawa Gunasekara
 
Seminar Report on image compression
Seminar Report on image compressionSeminar Report on image compression
Seminar Report on image compression
Pradip Kumar
 
Compression techniques
Compression techniquesCompression techniques
Compression techniques
m_divya_bharathi
 
Data compression
Data compressionData compression
Data compression
VIKAS SINGH BHADOURIA
 
Compression
CompressionCompression
Compression
Ashish Kumar
 
Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compression
M.k. Praveen
 

Viewers also liked (10)

Taxonomy of Differential Compression
Taxonomy of Differential CompressionTaxonomy of Differential Compression
Taxonomy of Differential Compression
 
Quantization
QuantizationQuantization
Quantization
 
Introduction for Data Compression
Introduction for Data Compression Introduction for Data Compression
Introduction for Data Compression
 
Vector quantization
Vector quantizationVector quantization
Vector quantization
 
Audio compression
Audio compressionAudio compression
Audio compression
 
Seminar Report on image compression
Seminar Report on image compressionSeminar Report on image compression
Seminar Report on image compression
 
Compression techniques
Compression techniquesCompression techniques
Compression techniques
 
Data compression
Data compressionData compression
Data compression
 
Compression
CompressionCompression
Compression
 
Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compression
 

Similar to Data compression tech cs

Sentimental analysis of financial articles using neural network
Sentimental analysis of financial articles using neural networkSentimental analysis of financial articles using neural network
Sentimental analysis of financial articles using neural network
Bhavyateja Potineni
 
Verilog Lecture1
Verilog Lecture1Verilog Lecture1
Verilog Lecture1
Béo Tú
 
Introduction to SeqAn, an Open-source C++ Template Library
Introduction to SeqAn, an Open-source C++ Template LibraryIntroduction to SeqAn, an Open-source C++ Template Library
Introduction to SeqAn, an Open-source C++ Template Library
Can Ozdoruk
 
Layout design on MICROWIND
Layout design on MICROWINDLayout design on MICROWIND
Layout design on MICROWIND
vaibhav jindal
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
Abhishek Gupta
 
dokumen.tips_logic-synthesis-report.pdf
dokumen.tips_logic-synthesis-report.pdfdokumen.tips_logic-synthesis-report.pdf
dokumen.tips_logic-synthesis-report.pdf
NithishKumar475285
 
Ann
AnnAnn
FPGA DESIGN FLOW.pdf
FPGA DESIGN FLOW.pdfFPGA DESIGN FLOW.pdf
FPGA DESIGN FLOW.pdf
RMDAcademicCoordinat
 
DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009
DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009
DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009
Harshal Hayatnagarkar
 
silent sound technology
silent sound technologysilent sound technology
silent sound technology
Najeeb p
 
IMAG 4850 Library Presentation
IMAG 4850 Library PresentationIMAG 4850 Library Presentation
IMAG 4850 Library Presentation
edward.eckel
 
MINOR PROJECT
MINOR PROJECTMINOR PROJECT
MINOR PROJECT
deepa bhatia
 
M.Tech Thesis on Simulation and Hardware Implementation of NLMS algorithm on ...
M.Tech Thesis on Simulation and Hardware Implementation of NLMS algorithm on ...M.Tech Thesis on Simulation and Hardware Implementation of NLMS algorithm on ...
M.Tech Thesis on Simulation and Hardware Implementation of NLMS algorithm on ...
Raj Kumar Thenua
 
NL to OCL via SBVR
NL to OCL via SBVRNL to OCL via SBVR
NL to OCL via SBVR
Imran Bajwa
 
Sample_Mini Project.pptx
Sample_Mini Project.pptxSample_Mini Project.pptx
Sample_Mini Project.pptx
Landlord13
 
CSEE&T 2017 SWEBOK Evolution Panel - View from ISO/IEC/JTC1/SC7/WG20 and SEMAT
CSEE&T 2017 SWEBOK Evolution Panel - View from ISO/IEC/JTC1/SC7/WG20 and SEMATCSEE&T 2017 SWEBOK Evolution Panel - View from ISO/IEC/JTC1/SC7/WG20 and SEMAT
CSEE&T 2017 SWEBOK Evolution Panel - View from ISO/IEC/JTC1/SC7/WG20 and SEMAT
Hironori Washizaki
 
Session 01 _rtl_design_with_vhdl 101
Session 01 _rtl_design_with_vhdl 101Session 01 _rtl_design_with_vhdl 101
Session 01 _rtl_design_with_vhdl 101
Mahmoud Abdellatif
 
Pengenalankepadaautocad
PengenalankepadaautocadPengenalankepadaautocad
Pengenalankepadaautocad
wkhairil80
 
TrustNote Cryptographic Algorithms Overview
TrustNote Cryptographic Algorithms OverviewTrustNote Cryptographic Algorithms Overview
TrustNote Cryptographic Algorithms Overview
TrustNote Foundation
 
Live coding
Live codingLive coding
Live coding
Akinori Kinoshita
 

Similar to Data compression tech cs (20)

Sentimental analysis of financial articles using neural network
Sentimental analysis of financial articles using neural networkSentimental analysis of financial articles using neural network
Sentimental analysis of financial articles using neural network
 
Verilog Lecture1
Verilog Lecture1Verilog Lecture1
Verilog Lecture1
 
Introduction to SeqAn, an Open-source C++ Template Library
Introduction to SeqAn, an Open-source C++ Template LibraryIntroduction to SeqAn, an Open-source C++ Template Library
Introduction to SeqAn, an Open-source C++ Template Library
 
Layout design on MICROWIND
Layout design on MICROWINDLayout design on MICROWIND
Layout design on MICROWIND
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
 
dokumen.tips_logic-synthesis-report.pdf
dokumen.tips_logic-synthesis-report.pdfdokumen.tips_logic-synthesis-report.pdf
dokumen.tips_logic-synthesis-report.pdf
 
Ann
AnnAnn
Ann
 
FPGA DESIGN FLOW.pdf
FPGA DESIGN FLOW.pdfFPGA DESIGN FLOW.pdf
FPGA DESIGN FLOW.pdf
 
DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009
DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009
DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009
 
silent sound technology
silent sound technologysilent sound technology
silent sound technology
 
IMAG 4850 Library Presentation
IMAG 4850 Library PresentationIMAG 4850 Library Presentation
IMAG 4850 Library Presentation
 
MINOR PROJECT
MINOR PROJECTMINOR PROJECT
MINOR PROJECT
 
M.Tech Thesis on Simulation and Hardware Implementation of NLMS algorithm on ...
M.Tech Thesis on Simulation and Hardware Implementation of NLMS algorithm on ...M.Tech Thesis on Simulation and Hardware Implementation of NLMS algorithm on ...
M.Tech Thesis on Simulation and Hardware Implementation of NLMS algorithm on ...
 
NL to OCL via SBVR
NL to OCL via SBVRNL to OCL via SBVR
NL to OCL via SBVR
 
Sample_Mini Project.pptx
Sample_Mini Project.pptxSample_Mini Project.pptx
Sample_Mini Project.pptx
 
CSEE&T 2017 SWEBOK Evolution Panel - View from ISO/IEC/JTC1/SC7/WG20 and SEMAT
CSEE&T 2017 SWEBOK Evolution Panel - View from ISO/IEC/JTC1/SC7/WG20 and SEMATCSEE&T 2017 SWEBOK Evolution Panel - View from ISO/IEC/JTC1/SC7/WG20 and SEMAT
CSEE&T 2017 SWEBOK Evolution Panel - View from ISO/IEC/JTC1/SC7/WG20 and SEMAT
 
Session 01 _rtl_design_with_vhdl 101
Session 01 _rtl_design_with_vhdl 101Session 01 _rtl_design_with_vhdl 101
Session 01 _rtl_design_with_vhdl 101
 
Pengenalankepadaautocad
PengenalankepadaautocadPengenalankepadaautocad
Pengenalankepadaautocad
 
TrustNote Cryptographic Algorithms Overview
TrustNote Cryptographic Algorithms OverviewTrustNote Cryptographic Algorithms Overview
TrustNote Cryptographic Algorithms Overview
 
Live coding
Live codingLive coding
Live coding
 

Recently uploaded

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 

Recently uploaded (20)

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 

Data compression tech cs

  • 1. NationalInstituteofScienceandTechnology [1] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 A Review of Data Compression Techniques Presented by Sudeepta Mishra Roll# CS200117052 At NIST,Berhampur Under the guidance of Mr. Rowdra Ghatak
  • 2. NationalInstituteofScienceandTechnology [2] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 Introduction • Data compression is the process of encoding data so that it takes less storage space or less transmission time than it would if it were not compressed. • Compression is possible because most real-world data is very redundant
  • 3. NationalInstituteofScienceandTechnology [3] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 Different Compression Techniques • Mainly two types of data Compression techniques are there. – Loss less Compression. Useful in spreadsheets, text, executable program Compression. – Lossy less Compression. Compression of images, movies and sounds.
  • 4. NationalInstituteofScienceandTechnology [4] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 Types of Loss less data Compression • Dictionary coders. – Zip (file format). – Lempel Ziv. • Entropy encoding. – Huffman coding (simple entropy coding). • Run-length encoding.
  • 5. NationalInstituteofScienceandTechnology [5] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 Dictionary-Based Compression • Dictionary-based algorithms do not encode single symbols as variable-length bit strings; they encode variable-length strings of symbols as single tokens. • The tokens form an index into a phrase dictionary. • If the tokens are smaller than the phrases they replace, compression occurs.
  • 6. NationalInstituteofScienceandTechnology [6] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 Types of Dictionary • Static Dictionary. • Semi-Adaptive Dictionary. • Adaptive Dictionary. – Lempel Ziv algorithms belong to this category of dictionary coders. The dictionary is being built in a single pass, while at the same time encoding the data. – The decoder can build up the dictionary in the same way as the encoder while decompressing the data.
  • 7. NationalInstituteofScienceandTechnology [7] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 • Using a English Dictionary the string: “A good example of how dictionary based compression works” • Gives : 1/1 822/3 674/4 1343/60 928/75 550/32 173/46 421/2 • Using the dictionary as lookup table, each word is coded as x/y, where, x gives the page no. and y gives the number of the word on that page. If the dictionary has 2,200 pages with less than 256 entries per page: Therefore x requires 12 bits and y requires 8 bits, i.e., 20 bits per word (2.5 bytes per word). Using ASCII coding the above string requires 48 bytes, whereas our encoding requires only 20 (<-2.5 * 8) bytes: 50% compression. Dictionary-Based Compression: Example
  • 8. NationalInstituteofScienceandTechnology [8] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 Lempel Ziv • It is a family of algorithms, stemming from the two algorithms proposed by Jacob Ziv and Abraham Lempel in their landmark papers in 1977 and 1978. LZ77 LZ78 LZR LZHLZSS LZB LZFG LZC LZT LZMW LZW LZJ
  • 9. NationalInstituteofScienceandTechnology [9] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 LZW Algorithm • It is An improved version of LZ78 algorithm. • Published by Terry Welch in 1984. • A dictionary that is indexed by “codes” is used. The dictionary is assumed to be initialized with 256 entries (indexed with ASCII codes 0 through 255) representing the ASCII table.
  • 10. NationalInstituteofScienceandTechnology [10] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Compression) W = NIL; while (there is input){ K = next symbol from input; if (WK exists in the dictionary) { W = WK; } else { output (index(W)); add WK to the dictionary; W = K; } }
  • 11. NationalInstituteofScienceandTechnology [11] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Compression) Flow Chart START W= NULL IS EOF ? K=NEXT INPUT IS WK FOUND? W=WK OUTPUT INDEX OF W ADD WK TO DICTIONARY STOP W=K YES NO YES NO
  • 12. NationalInstituteofScienceandTechnology [12] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Compression) Example • Input string is • The Initial Dictionary contains symbols like a, b, c, d with their index values as 1, 2, 3, 4 respectively. • Now the input string is read from left to right. Starting from a. a b d c a d a c a 1 b 2 c 3 d 4
  • 13. NationalInstituteofScienceandTechnology [13] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Compression) Example • W = Null • K = a • WK = a In the dictionary. a b d c a d a c a 1 b 2 c 3 d 4 K
  • 14. NationalInstituteofScienceandTechnology [14] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Compression) Example • K = b. • WK = ab is not in the dictionary. • Add WK to dictionary • Output code for a. • Set W = b a b d c a d a c K 1 ab 5a 1 b 2 c 3 d 4
  • 15. NationalInstituteofScienceandTechnology [15] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Compression) Example • K = d • WK = bd Not in the dictionary. Add bd to dictionary. • Output code b • Set W = d a b d c a d a c 1 K 2 ab 5a 1 b 2 c 3 d 4 bd 6
  • 16. NationalInstituteofScienceandTechnology [16] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Compression) Example • K = a • WK = da not in the dictionary. • Add it to dictionary. • Output code d • Set W = a a b d a b d a c 1 K 2 4 ab 5a 1 b 2 c 3 d 4 bd 6 da 7
  • 17. NationalInstituteofScienceandTechnology [17] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Compression) Example • K = b • WK = ab It is in the dictionary. a b d a b d a c 1 K 2 4 ab 5a 1 b 2 c 3 d 4 bd 6 da 7
  • 18. NationalInstituteofScienceandTechnology [18] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Compression) Example • K = d • WK = abd Not in the dictionary. • Add W to the dictionary. • Output code for W. • Set W = d a b d a b d a c 1 K 2 4 5 ab 5a 1 b 2 c 3 d 4 bd 6 da 7 abd 8
  • 19. NationalInstituteofScienceandTechnology [19] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Compression) Example • K = a • WK = da In the dictionary. a b d a b d a c 1 K 2 4 5 ab 5a 1 b 2 c 3 d 4 bd 6 da 7 abd 8
  • 20. NationalInstituteofScienceandTechnology [20] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Compression) Example • K = c • WK = dac Not in the dictionary. • Add WK to the dictionary. • Output code for W. • Set W = c • No input left so output code for W. a b d a b d a c 1 K 2 4 5 ab 5a 1 b 2 c 3 d 4 bd 6 da 7 abd 8 7 dac 9
  • 21. NationalInstituteofScienceandTechnology [21] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Compression) Example • The final output string is 1 2 4 5 7 3 • Stop. cadbadba 1 K 2 4 5 5ab 4d 3c 2b 1a 6bd 7da 8abd 7 9dac 3
  • 22. NationalInstituteofScienceandTechnology [22] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 LZW Decompression Algorithm read a character k; output k; w = k; while ( read a character k ) /* k could be a character or a code. */ { entry = dictionary entry for k; output entry; add w + entry[0] to dictionary; w = entry; }
  • 23. NationalInstituteofScienceandTechnology [23] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 LZW Decompression Algorithm Flow Chart START Output K IS EOF ? K=NEXT INPUT ENTRY=DICTIONARY INDEX (K) ADD W+ENTRY[0] TO DICTIONARY STOP W=ENTRY K=INPUT W=K YES NO Output ENTRY
  • 24. NationalInstituteofScienceandTechnology [24] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Decompression) Example • K = 1 • Out put K (i.e. a) • W = K 1 K 2 4 5 4d 3c 2b 1a 7 3 a
  • 25. NationalInstituteofScienceandTechnology [25] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Decompression) Example • K = 2 • entry = b • Output entry • Add W + entry[0] to dictionary • W = entry[0] (i.e. b) 1 K 2 4 5 4d 3c 2b 1a 7 3 a b 5ab
  • 26. NationalInstituteofScienceandTechnology [26] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Decompression) Example • K = 4 • entry = d • Output entry • Add W + entry[0] to dictionary • W = entry[0] (i.e. d) 1 K 2 4 5 4d 3c 2b 1a 7 3 a b 5ab 6bd d
  • 27. NationalInstituteofScienceandTechnology [27] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Decompression) Example • K = 5 • entry = ab • Output entry • Add W + entry[0] to dictionary • W = entry[0] (i.e. a) 1 K 2 4 5 4d 3c 2b 1a 7 3 a b 5ab 6bd d a b 7da
  • 28. NationalInstituteofScienceandTechnology [28] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Decompression) Example • K = 7 • entry = da • Output entry • Add W + entry[0] to dictionary • W = entry[0] (i.e. d) 1 K 2 4 5 4d 3c 2b 1a 7 3 a b 5ab 6bd d a b 7da d a 8abd
  • 29. NationalInstituteofScienceandTechnology [29] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 The LZW Algorithm (Decompression) Example • K = 3 • entry = c • Output entry • Add W + entry[0] to dictionary • W = entry[0] (i.e. c) 1 K 2 4 5 4d 3c 2b 1a 7 3 a b 5ab 6bd d a b 7da d a 8abd c 9dac
  • 30. NationalInstituteofScienceandTechnology [30] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 Advantages • As LZW is adaptive dictionary coding no need to transfer the dictionary explicitly. • It will be created at the decoder side. • LZW can be made really fast, it grabs a fixed number of bits from input, so bit parsing is very easy, and table look up is automatic.
  • 31. NationalInstituteofScienceandTechnology [31] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 Problems with the encoder • What if we run out of space? – Keep track of unused entries and use LRU (Last Recently Used). – Monitor compression performance and flush dictionary when performance is poor.
  • 32. NationalInstituteofScienceandTechnology [32] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 Conclusion • LZW has given new dimensions for the development of new compression techniques. • It has been implemented in well known compression format like Acrobat PDF and many other types of compression packages. • In combination with other compression techniques many other different compression techniques are developed like LZMS.
  • 33. NationalInstituteofScienceandTechnology [33] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 REFERENCES [1] http://www.bambooweb.com/articles/d/a/Data_Compression.html [2] http://tuxtina.de/files/seminar/LempelZivReport.pdf [3] BELL, T. C., CLEARY, J. G., AND WITTEN, I. H. Text Compression. Prentice Hall, Upper Sadle River, NJ, 1990. [4] http://www.cs.cf.ac.uk/Dave/Multimedia/node214.html [5] http://download.cdsoft.co.uk/tutorials/rlecompression/Run- Length Encoding (RLE) Tutorial.htm [6] David Salomon, Data Compression The Complete Reference, Second Edition. Springer-Verlac, New York, Inc, 2001 reprint. [7] http://www.programmersheaven.com/2/Art_Huffman_p1.htm [8] http://www.programmersheaven.com/2/Art_Huffman_p2.htm [9] Khalid Sayood, Introduction to Data Compression Second Edition, Chapter 5, pp. 137-157, Harcourt India Private Limited.
  • 34. NationalInstituteofScienceandTechnology [34] Technical Seminar Presentation 2005 Sudeepta Mishra NationalInstituteofScienceandTechnology Sudeepta Mishra CS200117052 Thank You