SlideShare une entreprise Scribd logo
1  sur  12
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Dynamic storage allocation techniques
Dynamic storage allocation techniquesDynamic storage allocation techniques
Dynamic storage allocation techniques
Shashwat Shriparv
 
video compression techique
video compression techiquevideo compression techique
video compression techique
Ashish Kumar
 

Tendances (20)

Comparison between Lossy and Lossless Compression
Comparison between Lossy and Lossless CompressionComparison between Lossy and Lossless Compression
Comparison between Lossy and Lossless Compression
 
Vc dimension in Machine Learning
Vc dimension in Machine LearningVc dimension in Machine Learning
Vc dimension in Machine Learning
 
LZ77 and LZ78 Compression Algorithms
LZ77 and LZ78 Compression AlgorithmsLZ77 and LZ78 Compression Algorithms
LZ77 and LZ78 Compression Algorithms
 
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPURLine Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
Line Of Code(LOC) In Software Engineering By NADEEM AHMED FROM DEPALPUR
 
Color Image Processing: Basics
Color Image Processing: BasicsColor Image Processing: Basics
Color Image Processing: Basics
 
Code Optimization
Code OptimizationCode Optimization
Code Optimization
 
Huffman Coding
Huffman CodingHuffman Coding
Huffman Coding
 
digital image processing
digital image processingdigital image processing
digital image processing
 
Region Splitting and Merging Technique For Image segmentation.
Region Splitting and Merging Technique For Image segmentation.Region Splitting and Merging Technique For Image segmentation.
Region Splitting and Merging Technique For Image segmentation.
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standards
 
Unit 3 Arithmetic Coding
Unit 3 Arithmetic CodingUnit 3 Arithmetic Coding
Unit 3 Arithmetic Coding
 
Lzw compression ppt
Lzw compression pptLzw compression ppt
Lzw compression ppt
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compression
 
Data compression
Data compression Data compression
Data compression
 
Dynamic storage allocation techniques
Dynamic storage allocation techniquesDynamic storage allocation techniques
Dynamic storage allocation techniques
 
video compression techique
video compression techiquevideo compression techique
video compression techique
 
Vector quantization
Vector quantizationVector quantization
Vector quantization
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
 
Inverted index
Inverted indexInverted index
Inverted index
 

Similaire à 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
 

Similaire à 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...
 

Plus de Dr Piyush Charan

Plus de 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 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
 
Unit 3 Professional Responsibility
Unit 3 Professional ResponsibilityUnit 3 Professional Responsibility
Unit 3 Professional Responsibility
 

Dernier

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
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
 

Dernier (20)

Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
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
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
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 ...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
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
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
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
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 

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