SlideShare a Scribd company logo
A Review of  Data  Compression Techniques Presented  By  IQxplorer
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
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 .
Dictionary coders. Zip (file format). Lempel Ziv. Entropy encoding. Huffman coding (simple entropy coding). Run-length encoding.
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.
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.
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.
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 LZH LZSS LZB LZFG LZC LZT LZMW LZW LZJ
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.
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; } }
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
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
W = Null K = a WK = a In the dictionary . K a b d c a d a c a 1 b 2 c 3 d 4
K = b. WK = ab  is not in the dictionary. Add WK to dictionary Output code for a.  Set W = b K a b d c a d a c 1 ab 5 a 1 b 2 c 3 d 4
K = d WK = bd Not in the dictionary. Add bd to dictionary. Output code b Set W = d K a b d c a d a c 1 2 ab 5 a 1 b 2 c 3 d 4 bd 6
K = a WK = da  not in the dictionary. Add it to dictionary. Output code d Set W = a K a b d a b d a c 1 2 4 ab 5 a 1 b 2 c 3 d 4 bd 6 da 7
K = b WK = ab  It is in the dictionary. K a b d a b d a c 1 2 4 ab 5 a 1 b 2 c 3 d 4 bd 6 da 7
K = d WK = abd  Not in the dictionary. Add W to the dictionary. Output code for W. Set W = d K a b d a b d a c 1 2 4 5 ab 5 a 1 b 2 c 3 d 4 bd 6 da 7 abd 8
The LZW Algorithm (Compression) Example K = a WK = da  In the dictionary. K a b d a b d a c 1 2 4 5 ab 5 a 1 b 2 c 3 d 4 bd 6 da 7 abd 8
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. K a b d a b d a c 1 2 4 5 ab 5 a 1 b 2 c 3 d 4 bd 6 da 7 abd 8 7 dac 9
The LZW Algorithm (Compression) Example The final output string is 1 2 4 5 7 3 Stop. K c a d b a d b a 1 2 4 5 5 ab 4 d 3 c 2 b 1 a 6 bd 7 da 8 abd 7 9 dac 3
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; }
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
The LZW Algorithm (Decompression) Example K = 1 Out put K (i.e. a) W = K K 1 2 4 5 4 d 3 c 2 b 1 a 7 3 a
The LZW Algorithm (Decompression) Example K = 2 entry = b Output entry Add W + entry[0] to dictionary W = entry[0] (i.e. b) K 1 2 4 5 4 d 3 c 2 b 1 a 7 3 a b 5 ab
The LZW Algorithm (Decompression) Example K = 4 entry = d Output entry Add W + entry[0] to dictionary W = entry[0] (i.e. d) K 1 2 4 5 4 d 3 c 2 b 1 a 7 3 a b 5 ab 6 bd d
The LZW Algorithm (Decompression) Example K = 5 entry = ab Output entry Add W + entry[0] to dictionary W = entry[0] (i.e. a) K 1 2 4 5 4 d 3 c 2 b 1 a 7 3 a b 5 ab 6 bd d a b 7 da
The LZW Algorithm (Decompression) Example K = 7 entry = da Output entry Add W + entry[0] to dictionary W = entry[0] (i.e. d) K 1 2 4 5 4 d 3 c 2 b 1 a 7 3 a b 5 ab 6 bd d a b 7 da d a 8 abd
The LZW Algorithm (Decompression) Example K = 3 entry = c Output entry Add W + entry[0] to dictionary W = entry[0] (i.e. c) K 1 2 4 5 4 d 3 c 2 b 1 a 7 3 a b 5 ab 6 bd d a b 7 da d a 8 abd c 9 dac
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.
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.
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.
[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.
 
Ad

More Related Content

What's hot (20)

Instruction set
Instruction setInstruction set
Instruction set
Kamini Benare
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5
Motaz Saad
 
Lecture 3 RE NFA DFA
Lecture 3   RE NFA DFA Lecture 3   RE NFA DFA
Lecture 3 RE NFA DFA
Rebaz Najeeb
 
Register allocation and assignment
Register allocation and assignmentRegister allocation and assignment
Register allocation and assignment
Karthi Keyan
 
The reasons why 64-bit programs require more stack memory
The reasons why 64-bit programs require more stack memoryThe reasons why 64-bit programs require more stack memory
The reasons why 64-bit programs require more stack memory
PVS-Studio
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Bilal Amjad
 
Arrays and addressing modes
Arrays and addressing modesArrays and addressing modes
Arrays and addressing modes
Bilal Amjad
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1
Motaz Saad
 
Programming languages
Programming languagesProgramming languages
Programming languages
Eelco Visser
 
20141204.journal club
20141204.journal club20141204.journal club
20141204.journal club
Hayaru SHOUNO
 
Multiplication & division instructions microprocessor 8086
Multiplication & division instructions microprocessor 8086Multiplication & division instructions microprocessor 8086
Multiplication & division instructions microprocessor 8086
University of Gujrat, Pakistan
 
Compiler unit 5
Compiler  unit 5Compiler  unit 5
Compiler unit 5
BBDITM LUCKNOW
 
8086 alp
8086 alp8086 alp
8086 alp
Velalar College of Engineering and Technology
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Bilal Amjad
 
Strings
StringsStrings
Strings
Nilesh Dalvi
 
Temporal logic and functional reactive programming
Temporal logic and functional reactive programmingTemporal logic and functional reactive programming
Temporal logic and functional reactive programming
Sergei Winitzki
 
Intermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler Design
Kuppusamy P
 
Optimization of dfa
Optimization of dfaOptimization of dfa
Optimization of dfa
Kiran Acharya
 
Assembly Language String Chapter
Assembly Language String Chapter Assembly Language String Chapter
Assembly Language String Chapter
Atieq-ur -Rehman
 
Java on arm theory, applications, and workloads [dev5048]
Java on arm  theory, applications, and workloads [dev5048]Java on arm  theory, applications, and workloads [dev5048]
Java on arm theory, applications, and workloads [dev5048]
Aleksei Voitylov
 
Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5
Motaz Saad
 
Lecture 3 RE NFA DFA
Lecture 3   RE NFA DFA Lecture 3   RE NFA DFA
Lecture 3 RE NFA DFA
Rebaz Najeeb
 
Register allocation and assignment
Register allocation and assignmentRegister allocation and assignment
Register allocation and assignment
Karthi Keyan
 
The reasons why 64-bit programs require more stack memory
The reasons why 64-bit programs require more stack memoryThe reasons why 64-bit programs require more stack memory
The reasons why 64-bit programs require more stack memory
PVS-Studio
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Bilal Amjad
 
Arrays and addressing modes
Arrays and addressing modesArrays and addressing modes
Arrays and addressing modes
Bilal Amjad
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1
Motaz Saad
 
Programming languages
Programming languagesProgramming languages
Programming languages
Eelco Visser
 
20141204.journal club
20141204.journal club20141204.journal club
20141204.journal club
Hayaru SHOUNO
 
Multiplication & division instructions microprocessor 8086
Multiplication & division instructions microprocessor 8086Multiplication & division instructions microprocessor 8086
Multiplication & division instructions microprocessor 8086
University of Gujrat, Pakistan
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 10 ( Arrays and ...
Bilal Amjad
 
Temporal logic and functional reactive programming
Temporal logic and functional reactive programmingTemporal logic and functional reactive programming
Temporal logic and functional reactive programming
Sergei Winitzki
 
Intermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler Design
Kuppusamy P
 
Assembly Language String Chapter
Assembly Language String Chapter Assembly Language String Chapter
Assembly Language String Chapter
Atieq-ur -Rehman
 
Java on arm theory, applications, and workloads [dev5048]
Java on arm  theory, applications, and workloads [dev5048]Java on arm  theory, applications, and workloads [dev5048]
Java on arm theory, applications, and workloads [dev5048]
Aleksei Voitylov
 

Viewers also liked (20)

data compression technique
data compression techniquedata compression technique
data compression technique
CHINMOY PAUL
 
Data compression
Data compressionData compression
Data compression
VIKAS SINGH BHADOURIA
 
Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compression
M.k. Praveen
 
Data compression
Data compression Data compression
Data compression
Muhammad Irtiza
 
Compression
CompressionCompression
Compression
Ashish Kumar
 
Data compression introduction
Data compression introductionData compression introduction
Data compression introduction
Rahul Khanwani
 
Compression techniques
Compression techniquesCompression techniques
Compression techniques
m_divya_bharathi
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
Shivangi Saxena
 
Data compression
Data compressionData compression
Data compression
Sherif Abdelfattah
 
Dictionary Based Compression
Dictionary Based CompressionDictionary Based Compression
Dictionary Based Compression
anithabalaprabhu
 
Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)
Project Student
 
Chapter 5 - Data Compression
Chapter 5 - Data CompressionChapter 5 - Data Compression
Chapter 5 - Data Compression
Pratik Pradhan
 
Lz77 / Lempel-Ziv Algorithm
Lz77 / Lempel-Ziv AlgorithmLz77 / Lempel-Ziv Algorithm
Lz77 / Lempel-Ziv Algorithm
Veysi Ertekin
 
Lzw compression ppt
Lzw compression pptLzw compression ppt
Lzw compression ppt
Rabia Nazir
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniques
Deep Bhatt
 
Lz77 (sliding window)
Lz77 (sliding window)Lz77 (sliding window)
Lz77 (sliding window)
MANISH T I
 
Image compression
Image compressionImage compression
Image compression
Ale Johnsan
 
Image compression
Image compressionImage compression
Image compression
partha pratim deb
 
Data compression
Data compressionData compression
Data compression
Sumant Diwakar
 
Data compession
Data compession Data compession
Data compession
arvind carpenter
 
Ad

Similar to Data Compression Technique (20)

LZW Presentation.pptx
LZW Presentation.pptxLZW Presentation.pptx
LZW Presentation.pptx
IsraaAkramBasheer
 
Lex and Yacc ppt
Lex and Yacc pptLex and Yacc ppt
Lex and Yacc ppt
pssraikar
 
LZW Data Compression: Efficient Compression Algorithm for Lossless Data Compr...
LZW Data Compression: Efficient Compression Algorithm for Lossless Data Compr...LZW Data Compression: Efficient Compression Algorithm for Lossless Data Compr...
LZW Data Compression: Efficient Compression Algorithm for Lossless Data Compr...
Abdulaziz Awwad
 
Introducing Arc: A Common Intermediate Language for Unified Batch and Stream...
Introducing Arc:  A Common Intermediate Language for Unified Batch and Stream...Introducing Arc:  A Common Intermediate Language for Unified Batch and Stream...
Introducing Arc: A Common Intermediate Language for Unified Batch and Stream...
Flink Forward
 
computer organization and assembly language.docx
computer organization and assembly language.docxcomputer organization and assembly language.docx
computer organization and assembly language.docx
alisoftwareengineer1
 
Design and Implementation of LZW Data Compression Algorithm
Design and Implementation of LZW Data Compression AlgorithmDesign and Implementation of LZW Data Compression Algorithm
Design and Implementation of LZW Data Compression Algorithm
ijistjournal
 
Design and Implementation of LZW Data Compression Algorithm
Design and Implementation of LZW Data Compression AlgorithmDesign and Implementation of LZW Data Compression Algorithm
Design and Implementation of LZW Data Compression Algorithm
ijistjournal
 
LEX lexical analyzer for compiler theory.ppt
LEX lexical analyzer for compiler theory.pptLEX lexical analyzer for compiler theory.ppt
LEX lexical analyzer for compiler theory.ppt
dralexpasion
 
Virtual Machine for Regular Expressions
Virtual Machine for Regular ExpressionsVirtual Machine for Regular Expressions
Virtual Machine for Regular Expressions
Alexander Yakushev
 
AST for JavaScript developers
AST for JavaScript developersAST for JavaScript developers
AST for JavaScript developers
Bohdan Liashenko
 
AssignmentThe purpose of this assignment is to get you familiar .docx
AssignmentThe purpose of this assignment is to get you familiar .docxAssignmentThe purpose of this assignment is to get you familiar .docx
AssignmentThe purpose of this assignment is to get you familiar .docx
ssuser562afc1
 
ITU - MDD - Textural Languages and Grammars
ITU - MDD - Textural Languages and GrammarsITU - MDD - Textural Languages and Grammars
ITU - MDD - Textural Languages and Grammars
Tonny Madsen
 
Complier Design - Operations on Languages, RE, Finite Automata
Complier Design - Operations on Languages, RE, Finite AutomataComplier Design - Operations on Languages, RE, Finite Automata
Complier Design - Operations on Languages, RE, Finite Automata
Faculty of Computers and Informatics, Suez Canal University, Ismailia, Egypt
 
Tech Days Paris Intoduction F# and Collective Intelligence
Tech Days Paris Intoduction F# and Collective IntelligenceTech Days Paris Intoduction F# and Collective Intelligence
Tech Days Paris Intoduction F# and Collective Intelligence
Robert Pickering
 
Compiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term RewritingCompiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term Rewriting
Eelco Visser
 
Ieee2013_upgrading_knowledge_matlab_pt2
Ieee2013_upgrading_knowledge_matlab_pt2Ieee2013_upgrading_knowledge_matlab_pt2
Ieee2013_upgrading_knowledge_matlab_pt2
Georgios Drakopoulos
 
scripting in Python
scripting in Pythonscripting in Python
scripting in Python
Team-VLSI-ITMU
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
Education Front
 
Graph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptx
Graph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptx
Graph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptx
atharvahambarde1
 
Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expression
Animesh Chaturvedi
 
Lex and Yacc ppt
Lex and Yacc pptLex and Yacc ppt
Lex and Yacc ppt
pssraikar
 
LZW Data Compression: Efficient Compression Algorithm for Lossless Data Compr...
LZW Data Compression: Efficient Compression Algorithm for Lossless Data Compr...LZW Data Compression: Efficient Compression Algorithm for Lossless Data Compr...
LZW Data Compression: Efficient Compression Algorithm for Lossless Data Compr...
Abdulaziz Awwad
 
Introducing Arc: A Common Intermediate Language for Unified Batch and Stream...
Introducing Arc:  A Common Intermediate Language for Unified Batch and Stream...Introducing Arc:  A Common Intermediate Language for Unified Batch and Stream...
Introducing Arc: A Common Intermediate Language for Unified Batch and Stream...
Flink Forward
 
computer organization and assembly language.docx
computer organization and assembly language.docxcomputer organization and assembly language.docx
computer organization and assembly language.docx
alisoftwareengineer1
 
Design and Implementation of LZW Data Compression Algorithm
Design and Implementation of LZW Data Compression AlgorithmDesign and Implementation of LZW Data Compression Algorithm
Design and Implementation of LZW Data Compression Algorithm
ijistjournal
 
Design and Implementation of LZW Data Compression Algorithm
Design and Implementation of LZW Data Compression AlgorithmDesign and Implementation of LZW Data Compression Algorithm
Design and Implementation of LZW Data Compression Algorithm
ijistjournal
 
LEX lexical analyzer for compiler theory.ppt
LEX lexical analyzer for compiler theory.pptLEX lexical analyzer for compiler theory.ppt
LEX lexical analyzer for compiler theory.ppt
dralexpasion
 
Virtual Machine for Regular Expressions
Virtual Machine for Regular ExpressionsVirtual Machine for Regular Expressions
Virtual Machine for Regular Expressions
Alexander Yakushev
 
AST for JavaScript developers
AST for JavaScript developersAST for JavaScript developers
AST for JavaScript developers
Bohdan Liashenko
 
AssignmentThe purpose of this assignment is to get you familiar .docx
AssignmentThe purpose of this assignment is to get you familiar .docxAssignmentThe purpose of this assignment is to get you familiar .docx
AssignmentThe purpose of this assignment is to get you familiar .docx
ssuser562afc1
 
ITU - MDD - Textural Languages and Grammars
ITU - MDD - Textural Languages and GrammarsITU - MDD - Textural Languages and Grammars
ITU - MDD - Textural Languages and Grammars
Tonny Madsen
 
Tech Days Paris Intoduction F# and Collective Intelligence
Tech Days Paris Intoduction F# and Collective IntelligenceTech Days Paris Intoduction F# and Collective Intelligence
Tech Days Paris Intoduction F# and Collective Intelligence
Robert Pickering
 
Compiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term RewritingCompiler Construction | Lecture 5 | Transformation by Term Rewriting
Compiler Construction | Lecture 5 | Transformation by Term Rewriting
Eelco Visser
 
Ieee2013_upgrading_knowledge_matlab_pt2
Ieee2013_upgrading_knowledge_matlab_pt2Ieee2013_upgrading_knowledge_matlab_pt2
Ieee2013_upgrading_knowledge_matlab_pt2
Georgios Drakopoulos
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
Education Front
 
Graph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptx
Graph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptx
Graph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptxGraph.pptx
atharvahambarde1
 
Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expression
Animesh Chaturvedi
 
Ad

More from nayakslideshare (20)

Mips 64
Mips 64Mips 64
Mips 64
nayakslideshare
 
Digital Signature
Digital SignatureDigital Signature
Digital Signature
nayakslideshare
 
Spyware
SpywareSpyware
Spyware
nayakslideshare
 
Gis
GisGis
Gis
nayakslideshare
 
Lcd
LcdLcd
Lcd
nayakslideshare
 
Hyper Threading Technology
Hyper Threading TechnologyHyper Threading Technology
Hyper Threading Technology
nayakslideshare
 
Intro To Hacking
Intro To HackingIntro To Hacking
Intro To Hacking
nayakslideshare
 
Quantum Teleportation
Quantum TeleportationQuantum Teleportation
Quantum Teleportation
nayakslideshare
 
Biochip 1
Biochip 1Biochip 1
Biochip 1
nayakslideshare
 
Biochip
BiochipBiochip
Biochip
nayakslideshare
 
Satellite Networks
Satellite NetworksSatellite Networks
Satellite Networks
nayakslideshare
 
Cybercrime
CybercrimeCybercrime
Cybercrime
nayakslideshare
 
Cybercrime 1
Cybercrime 1Cybercrime 1
Cybercrime 1
nayakslideshare
 
Biochip 1
Biochip 1Biochip 1
Biochip 1
nayakslideshare
 
Touch Screens
Touch ScreensTouch Screens
Touch Screens
nayakslideshare
 
Linux Security
Linux SecurityLinux Security
Linux Security
nayakslideshare
 
Dna Fingerprinting
Dna FingerprintingDna Fingerprinting
Dna Fingerprinting
nayakslideshare
 
Thinking Critically About WWW
Thinking Critically About WWWThinking Critically About WWW
Thinking Critically About WWW
nayakslideshare
 
Remote Sensing
Remote SensingRemote Sensing
Remote Sensing
nayakslideshare
 

Recently uploaded (20)

Consolidated accounting notes presentation
Consolidated accounting notes presentationConsolidated accounting notes presentation
Consolidated accounting notes presentation
ashforddube14
 
The GensoL Scam: How 1,000 Cr EV Dreams Funded Jaggis' Luxury Empire
The GensoL Scam: How 1,000 Cr EV Dreams Funded Jaggis' Luxury EmpireThe GensoL Scam: How 1,000 Cr EV Dreams Funded Jaggis' Luxury Empire
The GensoL Scam: How 1,000 Cr EV Dreams Funded Jaggis' Luxury Empire
CACompany
 
Abhay Bhutada Building Success with Vision and Responsibility
Abhay Bhutada Building Success with Vision and ResponsibilityAbhay Bhutada Building Success with Vision and Responsibility
Abhay Bhutada Building Success with Vision and Responsibility
Harsh Mishra
 
DRAFT Internal presentation - Accessibility Act v2.pptx
DRAFT Internal presentation - Accessibility Act v2.pptxDRAFT Internal presentation - Accessibility Act v2.pptx
DRAFT Internal presentation - Accessibility Act v2.pptx
FinTech Belgium
 
Understanding Abhay Bhutada's Salary Milestone and His Commitment to Social P...
Understanding Abhay Bhutada's Salary Milestone and His Commitment to Social P...Understanding Abhay Bhutada's Salary Milestone and His Commitment to Social P...
Understanding Abhay Bhutada's Salary Milestone and His Commitment to Social P...
Harsh Mishra
 
The Rise of Abhay Bhutada and His Contribution to Society
The Rise of Abhay Bhutada and His Contribution to SocietyThe Rise of Abhay Bhutada and His Contribution to Society
The Rise of Abhay Bhutada and His Contribution to Society
Roshan Rai
 
Depreciation of equipment's ____-__ .ppt
Depreciation of equipment's ____-__ .pptDepreciation of equipment's ____-__ .ppt
Depreciation of equipment's ____-__ .ppt
bluehhh07
 
META Stock: Meta Platforms' Bold Bet on the Future
META Stock: Meta Platforms' Bold Bet on the FutureMETA Stock: Meta Platforms' Bold Bet on the Future
META Stock: Meta Platforms' Bold Bet on the Future
Meyka ai
 
Decoding What Project Financial Management Is.pdf
Decoding What Project Financial Management Is.pdfDecoding What Project Financial Management Is.pdf
Decoding What Project Financial Management Is.pdf
Enterprise Wired
 
ACAL- insurance lebanese Report 2016.pdf
ACAL- insurance lebanese Report 2016.pdfACAL- insurance lebanese Report 2016.pdf
ACAL- insurance lebanese Report 2016.pdf
zkh10452
 
The Impact of the Abhay Bhutada Foundation in Education
The Impact of the Abhay Bhutada Foundation in EducationThe Impact of the Abhay Bhutada Foundation in Education
The Impact of the Abhay Bhutada Foundation in Education
Harsh Mishra
 
Introduction to Agribusiness Marketing.pdf
Introduction to Agribusiness Marketing.pdfIntroduction to Agribusiness Marketing.pdf
Introduction to Agribusiness Marketing.pdf
AdityaPrananda3
 
downhill-all-the-way (1).pdf BAth university
downhill-all-the-way (1).pdf  BAth universitydownhill-all-the-way (1).pdf  BAth university
downhill-all-the-way (1).pdf BAth university
Henry Tapper
 
Lec 3 Blockchain Digital Signature 2022f.pdf
Lec 3 Blockchain Digital Signature 2022f.pdfLec 3 Blockchain Digital Signature 2022f.pdf
Lec 3 Blockchain Digital Signature 2022f.pdf
junaidkhalid631
 
George Mankiw Principle of Economics Chapter 26
George Mankiw Principle of Economics Chapter 26George Mankiw Principle of Economics Chapter 26
George Mankiw Principle of Economics Chapter 26
DyandraRenata
 
Consolidated Accounting notes presentation 2
Consolidated Accounting notes presentation 2Consolidated Accounting notes presentation 2
Consolidated Accounting notes presentation 2
ashforddube14
 
Top Dividend Paying Stocks in India 2025
Top Dividend Paying Stocks in India 2025Top Dividend Paying Stocks in India 2025
Top Dividend Paying Stocks in India 2025
Amit Finowings
 
TriStar Gold Corporate Presentation May 2025
TriStar Gold Corporate Presentation May 2025TriStar Gold Corporate Presentation May 2025
TriStar Gold Corporate Presentation May 2025
Adnet Communications
 
WPC Defined Benefit Pensions 24-5.pdf HT
WPC Defined Benefit  Pensions 24-5.pdf HTWPC Defined Benefit  Pensions 24-5.pdf HT
WPC Defined Benefit Pensions 24-5.pdf HT
Henry Tapper
 
At Nonabel Disability, we redefine disability support services in Greater Syd...
At Nonabel Disability, we redefine disability support services in Greater Syd...At Nonabel Disability, we redefine disability support services in Greater Syd...
At Nonabel Disability, we redefine disability support services in Greater Syd...
zarishah73a
 
Consolidated accounting notes presentation
Consolidated accounting notes presentationConsolidated accounting notes presentation
Consolidated accounting notes presentation
ashforddube14
 
The GensoL Scam: How 1,000 Cr EV Dreams Funded Jaggis' Luxury Empire
The GensoL Scam: How 1,000 Cr EV Dreams Funded Jaggis' Luxury EmpireThe GensoL Scam: How 1,000 Cr EV Dreams Funded Jaggis' Luxury Empire
The GensoL Scam: How 1,000 Cr EV Dreams Funded Jaggis' Luxury Empire
CACompany
 
Abhay Bhutada Building Success with Vision and Responsibility
Abhay Bhutada Building Success with Vision and ResponsibilityAbhay Bhutada Building Success with Vision and Responsibility
Abhay Bhutada Building Success with Vision and Responsibility
Harsh Mishra
 
DRAFT Internal presentation - Accessibility Act v2.pptx
DRAFT Internal presentation - Accessibility Act v2.pptxDRAFT Internal presentation - Accessibility Act v2.pptx
DRAFT Internal presentation - Accessibility Act v2.pptx
FinTech Belgium
 
Understanding Abhay Bhutada's Salary Milestone and His Commitment to Social P...
Understanding Abhay Bhutada's Salary Milestone and His Commitment to Social P...Understanding Abhay Bhutada's Salary Milestone and His Commitment to Social P...
Understanding Abhay Bhutada's Salary Milestone and His Commitment to Social P...
Harsh Mishra
 
The Rise of Abhay Bhutada and His Contribution to Society
The Rise of Abhay Bhutada and His Contribution to SocietyThe Rise of Abhay Bhutada and His Contribution to Society
The Rise of Abhay Bhutada and His Contribution to Society
Roshan Rai
 
Depreciation of equipment's ____-__ .ppt
Depreciation of equipment's ____-__ .pptDepreciation of equipment's ____-__ .ppt
Depreciation of equipment's ____-__ .ppt
bluehhh07
 
META Stock: Meta Platforms' Bold Bet on the Future
META Stock: Meta Platforms' Bold Bet on the FutureMETA Stock: Meta Platforms' Bold Bet on the Future
META Stock: Meta Platforms' Bold Bet on the Future
Meyka ai
 
Decoding What Project Financial Management Is.pdf
Decoding What Project Financial Management Is.pdfDecoding What Project Financial Management Is.pdf
Decoding What Project Financial Management Is.pdf
Enterprise Wired
 
ACAL- insurance lebanese Report 2016.pdf
ACAL- insurance lebanese Report 2016.pdfACAL- insurance lebanese Report 2016.pdf
ACAL- insurance lebanese Report 2016.pdf
zkh10452
 
The Impact of the Abhay Bhutada Foundation in Education
The Impact of the Abhay Bhutada Foundation in EducationThe Impact of the Abhay Bhutada Foundation in Education
The Impact of the Abhay Bhutada Foundation in Education
Harsh Mishra
 
Introduction to Agribusiness Marketing.pdf
Introduction to Agribusiness Marketing.pdfIntroduction to Agribusiness Marketing.pdf
Introduction to Agribusiness Marketing.pdf
AdityaPrananda3
 
downhill-all-the-way (1).pdf BAth university
downhill-all-the-way (1).pdf  BAth universitydownhill-all-the-way (1).pdf  BAth university
downhill-all-the-way (1).pdf BAth university
Henry Tapper
 
Lec 3 Blockchain Digital Signature 2022f.pdf
Lec 3 Blockchain Digital Signature 2022f.pdfLec 3 Blockchain Digital Signature 2022f.pdf
Lec 3 Blockchain Digital Signature 2022f.pdf
junaidkhalid631
 
George Mankiw Principle of Economics Chapter 26
George Mankiw Principle of Economics Chapter 26George Mankiw Principle of Economics Chapter 26
George Mankiw Principle of Economics Chapter 26
DyandraRenata
 
Consolidated Accounting notes presentation 2
Consolidated Accounting notes presentation 2Consolidated Accounting notes presentation 2
Consolidated Accounting notes presentation 2
ashforddube14
 
Top Dividend Paying Stocks in India 2025
Top Dividend Paying Stocks in India 2025Top Dividend Paying Stocks in India 2025
Top Dividend Paying Stocks in India 2025
Amit Finowings
 
TriStar Gold Corporate Presentation May 2025
TriStar Gold Corporate Presentation May 2025TriStar Gold Corporate Presentation May 2025
TriStar Gold Corporate Presentation May 2025
Adnet Communications
 
WPC Defined Benefit Pensions 24-5.pdf HT
WPC Defined Benefit  Pensions 24-5.pdf HTWPC Defined Benefit  Pensions 24-5.pdf HT
WPC Defined Benefit Pensions 24-5.pdf HT
Henry Tapper
 
At Nonabel Disability, we redefine disability support services in Greater Syd...
At Nonabel Disability, we redefine disability support services in Greater Syd...At Nonabel Disability, we redefine disability support services in Greater Syd...
At Nonabel Disability, we redefine disability support services in Greater Syd...
zarishah73a
 

Data Compression Technique

  • 1. A Review of Data Compression Techniques Presented By IQxplorer
  • 2. 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. 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. Dictionary coders. Zip (file format). Lempel Ziv. Entropy encoding. Huffman coding (simple entropy coding). Run-length encoding.
  • 5. 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. 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. 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.
  • 8. 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 LZH LZSS LZB LZFG LZC LZT LZMW LZW LZJ
  • 9. 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. 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. 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. 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. W = Null K = a WK = a In the dictionary . K a b d c a d a c a 1 b 2 c 3 d 4
  • 14. K = b. WK = ab is not in the dictionary. Add WK to dictionary Output code for a. Set W = b K a b d c a d a c 1 ab 5 a 1 b 2 c 3 d 4
  • 15. K = d WK = bd Not in the dictionary. Add bd to dictionary. Output code b Set W = d K a b d c a d a c 1 2 ab 5 a 1 b 2 c 3 d 4 bd 6
  • 16. K = a WK = da not in the dictionary. Add it to dictionary. Output code d Set W = a K a b d a b d a c 1 2 4 ab 5 a 1 b 2 c 3 d 4 bd 6 da 7
  • 17. K = b WK = ab It is in the dictionary. K a b d a b d a c 1 2 4 ab 5 a 1 b 2 c 3 d 4 bd 6 da 7
  • 18. K = d WK = abd Not in the dictionary. Add W to the dictionary. Output code for W. Set W = d K a b d a b d a c 1 2 4 5 ab 5 a 1 b 2 c 3 d 4 bd 6 da 7 abd 8
  • 19. The LZW Algorithm (Compression) Example K = a WK = da In the dictionary. K a b d a b d a c 1 2 4 5 ab 5 a 1 b 2 c 3 d 4 bd 6 da 7 abd 8
  • 20. 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. K a b d a b d a c 1 2 4 5 ab 5 a 1 b 2 c 3 d 4 bd 6 da 7 abd 8 7 dac 9
  • 21. The LZW Algorithm (Compression) Example The final output string is 1 2 4 5 7 3 Stop. K c a d b a d b a 1 2 4 5 5 ab 4 d 3 c 2 b 1 a 6 bd 7 da 8 abd 7 9 dac 3
  • 22. 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. 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. The LZW Algorithm (Decompression) Example K = 1 Out put K (i.e. a) W = K K 1 2 4 5 4 d 3 c 2 b 1 a 7 3 a
  • 25. The LZW Algorithm (Decompression) Example K = 2 entry = b Output entry Add W + entry[0] to dictionary W = entry[0] (i.e. b) K 1 2 4 5 4 d 3 c 2 b 1 a 7 3 a b 5 ab
  • 26. The LZW Algorithm (Decompression) Example K = 4 entry = d Output entry Add W + entry[0] to dictionary W = entry[0] (i.e. d) K 1 2 4 5 4 d 3 c 2 b 1 a 7 3 a b 5 ab 6 bd d
  • 27. The LZW Algorithm (Decompression) Example K = 5 entry = ab Output entry Add W + entry[0] to dictionary W = entry[0] (i.e. a) K 1 2 4 5 4 d 3 c 2 b 1 a 7 3 a b 5 ab 6 bd d a b 7 da
  • 28. The LZW Algorithm (Decompression) Example K = 7 entry = da Output entry Add W + entry[0] to dictionary W = entry[0] (i.e. d) K 1 2 4 5 4 d 3 c 2 b 1 a 7 3 a b 5 ab 6 bd d a b 7 da d a 8 abd
  • 29. The LZW Algorithm (Decompression) Example K = 3 entry = c Output entry Add W + entry[0] to dictionary W = entry[0] (i.e. c) K 1 2 4 5 4 d 3 c 2 b 1 a 7 3 a b 5 ab 6 bd d a b 7 da d a 8 abd c 9 dac
  • 30. 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. 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. 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. [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.