SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Downloaden Sie, um offline zu lesen
Lecture Notes on Dictionary Based
Compression Techniques
for
Open Educational Resource
on
Data Compression(CA209)
by
Dr. Piyush Charan
Assistant Professor
Department of Electronics and Communication Engg.
Integral University, Lucknow
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
• Dictionary-based compression algorithms
usually create a dictionary (a pattern of
characters) in memory as data is scanned
looking for repeated information (some
implementations use a static dictionary so it
does have to be built dynamically).
4/22/2021 2
Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
LZ77/LZ1/ Sliding Window
• In many applications, the output of the source consists of
recurring patterns.
• A very reasonable approach to encode such sources is to
keep a list, or dictionary, of frequently occurring patterns.
• The input is split into two classes, frequently occurring and
infrequently occurring patterns.
• There are static and adaptive dictionary techniques. Most
adaptive techniques have their roots in two papers by Ziv
and Lempel in 1977 (LZ77) and 1978 (LZ78)
4/22/2021 3
Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
LZ77 Approach
• LZ77 is a Dynamic Adaptive Dictionary Technique that consists of a Sliding
Window.
• The widow consists of two parts:
– Search Buffer (SB)
– Look Ahead Buffer (LAB)
• The size of the sliding window is given as:
• Window Size= SB+LAB
1 2 3 4 5 6 7 8 9 10 11 12 13
Search Buffer
Look Ahead Buffer
4/22/2021 4
Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
• Search Buffer: A Search Buffer that contains a portion of the
recently encoded sequence.
• Look Ahead Buffer: A Look - Ahead Buffer that contains the next
portion of the sequence.
• To encode the sequence in look-ahead buffer, the encoder moves a
search pointer back through the search buffer until it encounters a
match to the first symbol in the look-ahead buffer.
• Any two of the three must be given in the problem to encode given
sequence of text.
4/22/2021 5
Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
Process of LZ77 Compression
• Lets see the process below:
• Triplets: <o, l, c>
c a b r a c a d a b r a
Window Size=13
r r a ……
Search Buffer Look-Ahead Buffer
Offset
Length of match
codeword
4/22/2021 6
Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
• Offset (o): The distance between the search pointer and the
look-ahead buffer is called the offset.
• Length of match (l): The number of consecutive symbols in
the search buffer that match the consecutive symbols in the
look-ahead buffer, starting with the first symbol, is called the
length of match.
• Codeword (c): It is the codeword corresponding to the symbol
in the look-ahead buffer that follows the match.
4/22/2021 7
Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
LZ77 Example
• Encode the message-
c a b r a c a d a b r a r r a r r a d
• Here Window Size =13
• And Size of Look Ahead Buffer =6
c a b r a c a d a b r a r r a r r a d
4/22/2021 8
Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
LZ77 Example contd..
c a b r a c a
c a b r a c
c a b r a c a d
a d a……
d a b……
a b r……
<0,0,c(c)>
<0,0,c(a)>
Search buffer Look Ahead Buffer
<0,0,c(b)>
4/22/2021 9
Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
LZ77 Example contd..
c a b r a c a d a b
c a b r a c a d a
c a b r a c a d a b r a
b r a……
r a r……
r r a……
<0,0,c(r)>
<3,1,c(c)>
Search buffer Look Ahead Buffer
<2,1,c(d)>
4/22/2021 10
Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
LZ77 Example contd..
a d a b r a r r a r r a d
a b r a c a d a b r a r r a r r…… <7,4,c(r)>
<3,5,c(d)>
Search buffer Look Ahead Buffer
c
c a b r a c
4/22/2021 11
Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
LZ77 Example contd..
• The encoded message in the form of triplets are as
follows:
<0, 0, c(c)>,<0, 0, c(a)>,<0, 0, c(b)>,<0, 0, c(r)>
<3, 1, c(c)>,<2, 1, c(d)>,<7, 4, c(r)>,<3, 5, c(d)>
4/22/2021 12
Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Video Compression Techniques - Anurag Jain
Introduction to Video Compression Techniques - Anurag JainIntroduction to Video Compression Techniques - Anurag Jain
Introduction to Video Compression Techniques - Anurag Jain
Videoguy
 
Lecture 8 audio compression
Lecture 8 audio compressionLecture 8 audio compression
Lecture 8 audio compression
Mr SMAK
 

Was ist angesagt? (20)

Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
 
Audio compression
Audio compressionAudio compression
Audio compression
 
Transform coding
Transform codingTransform coding
Transform coding
 
Audio compression
Audio compressionAudio compression
Audio compression
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
 
The motion estimation
The motion estimationThe motion estimation
The motion estimation
 
Audio compression
Audio compressionAudio compression
Audio compression
 
Chapter 8 image compression
Chapter 8 image compressionChapter 8 image compression
Chapter 8 image compression
 
Introduction to Video Compression Techniques - Anurag Jain
Introduction to Video Compression Techniques - Anurag JainIntroduction to Video Compression Techniques - Anurag Jain
Introduction to Video Compression Techniques - Anurag Jain
 
Lecture 8 audio compression
Lecture 8 audio compressionLecture 8 audio compression
Lecture 8 audio compression
 
Audio compression
Audio compression Audio compression
Audio compression
 
Compression: Video Compression (MPEG and others)
Compression: Video Compression (MPEG and others)Compression: Video Compression (MPEG and others)
Compression: Video Compression (MPEG and others)
 
Arithmetic coding
Arithmetic codingArithmetic coding
Arithmetic coding
 
Data Redundacy
Data RedundacyData Redundacy
Data Redundacy
 
Watershed
WatershedWatershed
Watershed
 
Source coding
Source coding Source coding
Source coding
 
Turbo codes.ppt
Turbo codes.pptTurbo codes.ppt
Turbo codes.ppt
 
Subband Coding
Subband CodingSubband Coding
Subband Coding
 
Sound digitalisation
Sound digitalisationSound digitalisation
Sound digitalisation
 
Lzw coding technique for image compression
Lzw coding technique for image compressionLzw coding technique for image compression
Lzw coding technique for image compression
 

Ähnlich wie Unit 3 Dictionary based Compression Techniques

DNA Query Language DNAQL: A Novel Approach
DNA Query Language DNAQL: A Novel ApproachDNA Query Language DNAQL: A Novel Approach
DNA Query Language DNAQL: A Novel Approach
Editor IJCATR
 
Project Presentation
Project PresentationProject Presentation
Project Presentation
butest
 
A report of the work done in this project is available here
A report of the work done in this project is available hereA report of the work done in this project is available here
A report of the work done in this project is available here
butest
 
A Physicomimetics Desynchronization Algorithm without Global Time Knowledge f...
A Physicomimetics Desynchronization Algorithm without Global Time Knowledge f...A Physicomimetics Desynchronization Algorithm without Global Time Knowledge f...
A Physicomimetics Desynchronization Algorithm without Global Time Knowledge f...
Supasate Choochaisri
 

Ähnlich wie Unit 3 Dictionary based Compression Techniques (20)

Unit 2 Lecture notes on Huffman coding
Unit 2 Lecture notes on Huffman codingUnit 2 Lecture notes on Huffman coding
Unit 2 Lecture notes on Huffman coding
 
IRJET-Classifying Mined Online Discussion Data for Reflective Thinking based ...
IRJET-Classifying Mined Online Discussion Data for Reflective Thinking based ...IRJET-Classifying Mined Online Discussion Data for Reflective Thinking based ...
IRJET-Classifying Mined Online Discussion Data for Reflective Thinking based ...
 
Omics Logic - Bioinformatics 2.0
Omics Logic - Bioinformatics 2.0Omics Logic - Bioinformatics 2.0
Omics Logic - Bioinformatics 2.0
 
Unit 5 Quantization
Unit 5 QuantizationUnit 5 Quantization
Unit 5 Quantization
 
HPCAC - the state of bioinformatics in 2017
HPCAC - the state of bioinformatics in 2017HPCAC - the state of bioinformatics in 2017
HPCAC - the state of bioinformatics in 2017
 
HYPONYMY EXTRACTION OF DOMAIN ONTOLOGY CONCEPT BASED ON CCRFS AND HIERARCHY C...
HYPONYMY EXTRACTION OF DOMAIN ONTOLOGY CONCEPT BASED ON CCRFS AND HIERARCHY C...HYPONYMY EXTRACTION OF DOMAIN ONTOLOGY CONCEPT BASED ON CCRFS AND HIERARCHY C...
HYPONYMY EXTRACTION OF DOMAIN ONTOLOGY CONCEPT BASED ON CCRFS AND HIERARCHY C...
 
Hyponymy extraction of domain ontology
Hyponymy extraction of domain ontologyHyponymy extraction of domain ontology
Hyponymy extraction of domain ontology
 
Word2Vec model to generate synonyms on the fly in Apache Lucene.pdf
Word2Vec model to generate synonyms on the fly in Apache Lucene.pdfWord2Vec model to generate synonyms on the fly in Apache Lucene.pdf
Word2Vec model to generate synonyms on the fly in Apache Lucene.pdf
 
DNA Query Language DNAQL: A Novel Approach
DNA Query Language DNAQL: A Novel ApproachDNA Query Language DNAQL: A Novel Approach
DNA Query Language DNAQL: A Novel Approach
 
Project Presentation
Project PresentationProject Presentation
Project Presentation
 
A report of the work done in this project is available here
A report of the work done in this project is available hereA report of the work done in this project is available here
A report of the work done in this project is available here
 
Curation-Friendly Tools for the Scientific Researcher
Curation-Friendly Tools for the Scientific ResearcherCuration-Friendly Tools for the Scientific Researcher
Curation-Friendly Tools for the Scientific Researcher
 
2015 genome-center
2015 genome-center2015 genome-center
2015 genome-center
 
Class Diagram Extraction from Textual Requirements Using NLP Techniques
Class Diagram Extraction from Textual Requirements Using NLP TechniquesClass Diagram Extraction from Textual Requirements Using NLP Techniques
Class Diagram Extraction from Textual Requirements Using NLP Techniques
 
D017232729
D017232729D017232729
D017232729
 
Deep learning Tutorial - Part II
Deep learning Tutorial - Part IIDeep learning Tutorial - Part II
Deep learning Tutorial - Part II
 
Poster (1)
Poster (1)Poster (1)
Poster (1)
 
MULTI-LEARNING SPECIAL SESSION / EDUCON 2018 / EMADRID TEAM
MULTI-LEARNING SPECIAL SESSION / EDUCON 2018 / EMADRID TEAMMULTI-LEARNING SPECIAL SESSION / EDUCON 2018 / EMADRID TEAM
MULTI-LEARNING SPECIAL SESSION / EDUCON 2018 / EMADRID TEAM
 
E43022023
E43022023E43022023
E43022023
 
A Physicomimetics Desynchronization Algorithm without Global Time Knowledge f...
A Physicomimetics Desynchronization Algorithm without Global Time Knowledge f...A Physicomimetics Desynchronization Algorithm without Global Time Knowledge f...
A Physicomimetics Desynchronization Algorithm without Global Time Knowledge f...
 

Mehr von Dr Piyush Charan

Mehr von Dr Piyush Charan (20)

Unit 1- Intro to Wireless Standards.pdf
Unit 1- Intro to Wireless Standards.pdfUnit 1- Intro to Wireless Standards.pdf
Unit 1- Intro to Wireless Standards.pdf
 
Unit 1 Solar Collectors
Unit 1 Solar CollectorsUnit 1 Solar Collectors
Unit 1 Solar Collectors
 
Unit 4 Lossy Coding Preliminaries
Unit 4 Lossy Coding PreliminariesUnit 4 Lossy Coding Preliminaries
Unit 4 Lossy Coding Preliminaries
 
Unit 3 Geothermal Energy
Unit 3 Geothermal EnergyUnit 3 Geothermal Energy
Unit 3 Geothermal Energy
 
Unit 2: Programming Language Tools
Unit 2:  Programming Language ToolsUnit 2:  Programming Language Tools
Unit 2: Programming Language Tools
 
Unit 4 Arrays
Unit 4 ArraysUnit 4 Arrays
Unit 4 Arrays
 
Unit 3 Lecture Notes on Programming
Unit 3 Lecture Notes on ProgrammingUnit 3 Lecture Notes on Programming
Unit 3 Lecture Notes on Programming
 
Unit 3 introduction to programming
Unit 3 introduction to programmingUnit 3 introduction to programming
Unit 3 introduction to programming
 
Forensics and wireless body area networks
Forensics and wireless body area networksForensics and wireless body area networks
Forensics and wireless body area networks
 
Final PhD Defense Presentation
Final PhD Defense PresentationFinal PhD Defense Presentation
Final PhD Defense Presentation
 
Unit 3 Arithmetic Coding
Unit 3 Arithmetic CodingUnit 3 Arithmetic Coding
Unit 3 Arithmetic Coding
 
Unit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionUnit 1 Introduction to Data Compression
Unit 1 Introduction to Data Compression
 
Unit 1 Introduction to Non-Conventional Energy Resources
Unit 1 Introduction to Non-Conventional Energy ResourcesUnit 1 Introduction to Non-Conventional Energy Resources
Unit 1 Introduction to Non-Conventional Energy Resources
 
Unit 5-Operational Amplifiers and Electronic Measurement Devices
Unit 5-Operational Amplifiers and Electronic Measurement DevicesUnit 5-Operational Amplifiers and Electronic Measurement Devices
Unit 5-Operational Amplifiers and Electronic Measurement Devices
 
Unit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionUnit 1 Introduction to Data Compression
Unit 1 Introduction to Data Compression
 
Unit 4 Switching Theory and Logic Gates
Unit 4 Switching Theory and Logic GatesUnit 4 Switching Theory and Logic Gates
Unit 4 Switching Theory and Logic Gates
 
Unit 1 Numerical Problems on PN Junction Diode
Unit 1 Numerical Problems on PN Junction DiodeUnit 1 Numerical Problems on PN Junction Diode
Unit 1 Numerical Problems on PN Junction Diode
 
Unit 4_Part 1_Number System
Unit 4_Part 1_Number SystemUnit 4_Part 1_Number System
Unit 4_Part 1_Number System
 
Unit 5 Global Issues- Early life of Prophet Muhammad
Unit 5 Global Issues- Early life of Prophet MuhammadUnit 5 Global Issues- Early life of Prophet Muhammad
Unit 5 Global Issues- Early life of Prophet Muhammad
 
Unit 4 Engineering Ethics
Unit 4 Engineering EthicsUnit 4 Engineering Ethics
Unit 4 Engineering Ethics
 

Kürzlich hochgeladen

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 

Kürzlich hochgeladen (20)

chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 

Unit 3 Dictionary based Compression Techniques

  • 1. Lecture Notes on Dictionary Based Compression Techniques for Open Educational Resource on Data Compression(CA209) by Dr. Piyush Charan Assistant Professor Department of Electronics and Communication Engg. Integral University, Lucknow This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
  • 2. • Dictionary-based compression algorithms usually create a dictionary (a pattern of characters) in memory as data is scanned looking for repeated information (some implementations use a static dictionary so it does have to be built dynamically). 4/22/2021 2 Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
  • 3. LZ77/LZ1/ Sliding Window • In many applications, the output of the source consists of recurring patterns. • A very reasonable approach to encode such sources is to keep a list, or dictionary, of frequently occurring patterns. • The input is split into two classes, frequently occurring and infrequently occurring patterns. • There are static and adaptive dictionary techniques. Most adaptive techniques have their roots in two papers by Ziv and Lempel in 1977 (LZ77) and 1978 (LZ78) 4/22/2021 3 Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
  • 4. LZ77 Approach • LZ77 is a Dynamic Adaptive Dictionary Technique that consists of a Sliding Window. • The widow consists of two parts: – Search Buffer (SB) – Look Ahead Buffer (LAB) • The size of the sliding window is given as: • Window Size= SB+LAB 1 2 3 4 5 6 7 8 9 10 11 12 13 Search Buffer Look Ahead Buffer 4/22/2021 4 Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
  • 5. • Search Buffer: A Search Buffer that contains a portion of the recently encoded sequence. • Look Ahead Buffer: A Look - Ahead Buffer that contains the next portion of the sequence. • To encode the sequence in look-ahead buffer, the encoder moves a search pointer back through the search buffer until it encounters a match to the first symbol in the look-ahead buffer. • Any two of the three must be given in the problem to encode given sequence of text. 4/22/2021 5 Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
  • 6. Process of LZ77 Compression • Lets see the process below: • Triplets: <o, l, c> c a b r a c a d a b r a Window Size=13 r r a …… Search Buffer Look-Ahead Buffer Offset Length of match codeword 4/22/2021 6 Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
  • 7. • Offset (o): The distance between the search pointer and the look-ahead buffer is called the offset. • Length of match (l): The number of consecutive symbols in the search buffer that match the consecutive symbols in the look-ahead buffer, starting with the first symbol, is called the length of match. • Codeword (c): It is the codeword corresponding to the symbol in the look-ahead buffer that follows the match. 4/22/2021 7 Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
  • 8. LZ77 Example • Encode the message- c a b r a c a d a b r a r r a r r a d • Here Window Size =13 • And Size of Look Ahead Buffer =6 c a b r a c a d a b r a r r a r r a d 4/22/2021 8 Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
  • 9. LZ77 Example contd.. c a b r a c a c a b r a c c a b r a c a d a d a…… d a b…… a b r…… <0,0,c(c)> <0,0,c(a)> Search buffer Look Ahead Buffer <0,0,c(b)> 4/22/2021 9 Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
  • 10. LZ77 Example contd.. c a b r a c a d a b c a b r a c a d a c a b r a c a d a b r a b r a…… r a r…… r r a…… <0,0,c(r)> <3,1,c(c)> Search buffer Look Ahead Buffer <2,1,c(d)> 4/22/2021 10 Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
  • 11. LZ77 Example contd.. a d a b r a r r a r r a d a b r a c a d a b r a r r a r r…… <7,4,c(r)> <3,5,c(d)> Search buffer Look Ahead Buffer c c a b r a c 4/22/2021 11 Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow
  • 12. LZ77 Example contd.. • The encoded message in the form of triplets are as follows: <0, 0, c(c)>,<0, 0, c(a)>,<0, 0, c(b)>,<0, 0, c(r)> <3, 1, c(c)>,<2, 1, c(d)>,<7, 4, c(r)>,<3, 5, c(d)> 4/22/2021 12 Dr. Piyush, Charan Dept. of ECE, Integral University, Lucknow