SlideShare a Scribd company logo
3
Most read
10
Most read
11
Most read
Introduction to Data communication
Topic : LZW compression method
Lecture #15
Dr Rajiv Srivastava
Director
Sagar Institute of Research & Technology (SIRT)
Sagar Group of Institutions, Bhopal
http://www.sirtbhopal.ac.in
Unit 1
Lecture 15
2
LZW (Lempel-Ziv-welch) compression
method
• The LZW method to compress data is an
evolution of the method originally created by
Abraham Lempel and Jacob Ziv (Lempel-Ziv
method).
• Later the algorithm was improved by the two
originators (called LZ77 and LZ 78). Terry welch
further modified the algorithm and it is now
called the LZW (Lempel-Ziv-welch) method.
• The beauty of the method is that it is lossless
compression method, in which the whole text
can be totally recovered. The method is
sometimes preferable to Huffman encoding
because prior knowledge of the symbol
frequencies is not required.
Compression
• The compression, which takes place at the
sender site, has the following components :
1. a dictionary,
2. a buffer, and
3. an algorithm.
Dictionary
• To compress and decompress, LZW uses a
dictionary made of two rows (or columns).
The first row defines the code; the second row
defines the string corresponding to that code.
• Before compression begins, the dictionary is
initialized with only the set of alphabet
characters in the text.
• For example, if the text consists of only three
symbols , A, B, and C, the dictionary originally
has only 3 columns, but it becomes larger and
larger as the text is being compressed or
decompressed.
original dictionary for a three-symbol text.
1 2 3
A B C
Buffer
• LZW uses a buffer. The symbols enter the
buffer from one side one by one. The strings
are transferred to the dictionary and the
corresponding code is sent out according to
the algorithm discussed below.
Buffer at the compression site
Buffer
String to
dictionary
Code sent
Symbols from
the text
• Compression Algorithm
• Figure shows the flowchart for the
compression algorithm.
• Example of Compression
• Figure shows an example of compression
using the LZW method. The input text,
BABACABABA, is compressed to 214358 as
follow.
Data Communication & Computer Networks : LZW compression method
Data Communication & Computer Networks : LZW compression method
Data Communication & Computer Networks : LZW compression method
Decompression
• The decompression process, which takes place at
the receiver site, uses the same components as
the compression.
Dictionary
• A very interesting point is that the sender does not
send the dictionary created by the compression
process; instead, the dictionary will be created at
the receiver site and ,surprisingly, it is the exact
replica of the dictionary created at the sender site.
In other words, the information in the dictionary is
somehow embedded in the codes transmitted.
Buffer
• The decompression process uses two buffers.
The arriving codes are decoded and the
resulting symbols are kept in a temporary
buffer before entering, one symbol at a time,
the main buffer.
• Since each code may represent more than one
symbol, the temporary buffer is needed to
hold symbols before individual consumption
by the main buffer (see figure G.4)
• Buffer at the decompression site
Buffer
String to
dictionary
Symbols to be
printed
Code sent
Temporary
buffer
• Decompression Algorithm
• Figure G.5 shows the flowchart for the
decompression algorithm. Our algorithm, which
again is a very simplified version of the one in the
literature, has two loops.
• The first loop, in the iteration, decodes each code
received and sends the resulting symbols to the
temporary buffer.
• The second loop reads the symbols one by one
from the temporary buffer and eventually does
the same thing as the compression algorithm.
Data Communication & Computer Networks : LZW compression method
Data Communication & Computer Networks : LZW compression method
Thank You
Dr Rajiv Srivastava
Director
Sagar Institute of Research & Technology (SIRT)
Sagar Group of Institutions, Bhopal
http://www.sirtbhopal.ac.in

More Related Content

PPTX
Lzw
Daniel A
 
PPTX
Lzw compression
Meghna Singh
 
PPTX
Lzw algorithm
keyvan moazami
 
PPTX
Lzw compression ppt
Rabia Nazir
 
PPT
Data Compression Technique
nayakslideshare
 
PPT
Data compression tech cs
chirag1823
 
PPTX
Compression project presentation
faizang909
 
PDF
Runtime Bytecode Transformation for Smalltalk
ESUG
 
Lzw compression
Meghna Singh
 
Lzw algorithm
keyvan moazami
 
Lzw compression ppt
Rabia Nazir
 
Data Compression Technique
nayakslideshare
 
Data compression tech cs
chirag1823
 
Compression project presentation
faizang909
 
Runtime Bytecode Transformation for Smalltalk
ESUG
 

What's hot (13)

PDF
Data compression introduction
Rahul Khanwani
 
PDF
THE UNIFIED OPERATION STRUCTURE FOR SYMMETRIC-KEY ALGORITHM
cscpconf
 
PDF
4. algorithm modes (1)
DipakPurohit7
 
PPTX
Demo learn python
DIT University, Dehradun
 
PPTX
Protocol buffers on JRuby
Isaiah Peng
 
PPT
Plank
FNian
 
PDF
L7 64-bit Assembler
Sam Bowne
 
PDF
Fun with flexible indexing
Lucidworks (Archived)
 
PPTX
Guide to ROS tools
Ashwin Rajendran
 
PDF
Assignment 1-mtat
zafargilani
 
PPTX
Unit v memory & programmable logic devices
KanmaniRajamanickam
 
PPT
Dictor
anithabalaprabhu
 
PPTX
Apache Avro and Messaging at Scale in LivePerson
LivePerson
 
Data compression introduction
Rahul Khanwani
 
THE UNIFIED OPERATION STRUCTURE FOR SYMMETRIC-KEY ALGORITHM
cscpconf
 
4. algorithm modes (1)
DipakPurohit7
 
Demo learn python
DIT University, Dehradun
 
Protocol buffers on JRuby
Isaiah Peng
 
Plank
FNian
 
L7 64-bit Assembler
Sam Bowne
 
Fun with flexible indexing
Lucidworks (Archived)
 
Guide to ROS tools
Ashwin Rajendran
 
Assignment 1-mtat
zafargilani
 
Unit v memory & programmable logic devices
KanmaniRajamanickam
 
Apache Avro and Messaging at Scale in LivePerson
LivePerson
 
Ad

Similar to Data Communication & Computer Networks : LZW compression method (20)

PPT
111111111111111111111111111111111789.ppt
AllamJayaPrakash
 
PPT
111111111111111111111111111111111789.ppt
AllamJayaPrakash
 
PDF
Design and Implementation of LZW Data Compression Algorithm
ijistjournal
 
PDF
Design and Implementation of LZW Data Compression Algorithm
ijistjournal
 
PPTX
11. lzw coding
MdFazleRabbi18
 
PPTX
LZW Presentation.pptx
IsraaAkramBasheer
 
PPTX
LZW Data Compression: Efficient Compression Algorithm for Lossless Data Compr...
Abdulaziz Awwad
 
PPTX
CSC 204 PASSES IN COMPILER CONSTURCTION.pptx
ZulukhaniniTijani
 
PPTX
EC8691-MPMC-PPT.pptx
Manikandan813397
 
PPTX
Group presentation.pptx
Yonas D. Ebren
 
PPT
Performance Enhancement with Pipelining
Aneesh Raveendran
 
PPTX
Compiler Construction
Ahmed Raza
 
PPT
Performance Tuning by Dijesh P
PlusOrMinusZero
 
PDF
Ceh v5 module 20 buffer overflow
Vi Tính Hoàng Nam
 
PPTX
Fundamentals of Data compression
M.k. Praveen
 
DOCX
Topics:LZ77 & LZ78
MUHAMMAD AAMIR
 
PPTX
Lecture-9 Parallel-processing .pptx
hammadtahsan
 
PPTX
Computer_Organization_and_Architecture.pptx
ManimegalaM3
 
PPTX
Computer_Organization and architecture _unit 1.pptx
ManimegalaM3
 
PPTX
2024_lecture12_come321.pptx..................
ghada507476
 
111111111111111111111111111111111789.ppt
AllamJayaPrakash
 
111111111111111111111111111111111789.ppt
AllamJayaPrakash
 
Design and Implementation of LZW Data Compression Algorithm
ijistjournal
 
Design and Implementation of LZW Data Compression Algorithm
ijistjournal
 
11. lzw coding
MdFazleRabbi18
 
LZW Presentation.pptx
IsraaAkramBasheer
 
LZW Data Compression: Efficient Compression Algorithm for Lossless Data Compr...
Abdulaziz Awwad
 
CSC 204 PASSES IN COMPILER CONSTURCTION.pptx
ZulukhaniniTijani
 
EC8691-MPMC-PPT.pptx
Manikandan813397
 
Group presentation.pptx
Yonas D. Ebren
 
Performance Enhancement with Pipelining
Aneesh Raveendran
 
Compiler Construction
Ahmed Raza
 
Performance Tuning by Dijesh P
PlusOrMinusZero
 
Ceh v5 module 20 buffer overflow
Vi Tính Hoàng Nam
 
Fundamentals of Data compression
M.k. Praveen
 
Topics:LZ77 & LZ78
MUHAMMAD AAMIR
 
Lecture-9 Parallel-processing .pptx
hammadtahsan
 
Computer_Organization_and_Architecture.pptx
ManimegalaM3
 
Computer_Organization and architecture _unit 1.pptx
ManimegalaM3
 
2024_lecture12_come321.pptx..................
ghada507476
 
Ad

More from Dr Rajiv Srivastava (20)

PPTX
Trends of it
Dr Rajiv Srivastava
 
PDF
Placement at sagar group Bhopal | SIRT College Bhopal
Dr Rajiv Srivastava
 
PPTX
How to Prepare for Group Discussion
Dr Rajiv Srivastava
 
PPTX
Unix ppt
Dr Rajiv Srivastava
 
PPTX
SAGE GROUP - BEST ENGINEERING COLLEGE IN BHOPAL MP
Dr Rajiv Srivastava
 
PPT
lecture on data compression
Dr Rajiv Srivastava
 
PPT
Topic : X.25, Frame relay and ATM
Dr Rajiv Srivastava
 
PPT
Topic : B ISDN
Dr Rajiv Srivastava
 
PPT
Topic : ISDN(integrated services digital network) part 2
Dr Rajiv Srivastava
 
PPT
Topic: ISDN (Integrated Services Digital Network)
Dr Rajiv Srivastava
 
PPT
Topic: Virtual circuit & message switching
Dr Rajiv Srivastava
 
PPT
Topic Packet switching
Dr Rajiv Srivastava
 
PPT
Introduction to switching & circuit switching
Dr Rajiv Srivastava
 
PPT
Topic:Terminal handling & polling
Dr Rajiv Srivastava
 
PPT
Topic: Spread Spectrum
Dr Rajiv Srivastava
 
PPT
Applications of Time Division multiplexing : statistical TDM
Dr Rajiv Srivastava
 
PPT
Multiplexing : Wave Division Multiplexing
Dr Rajiv Srivastava
 
PPT
Multiplexing : FDM
Dr Rajiv Srivastava
 
PDF
Data Communication & Computer network: Shanon fano coding
Dr Rajiv Srivastava
 
PDF
Data Communication & Computer Networks : LZ algorithms
Dr Rajiv Srivastava
 
Trends of it
Dr Rajiv Srivastava
 
Placement at sagar group Bhopal | SIRT College Bhopal
Dr Rajiv Srivastava
 
How to Prepare for Group Discussion
Dr Rajiv Srivastava
 
SAGE GROUP - BEST ENGINEERING COLLEGE IN BHOPAL MP
Dr Rajiv Srivastava
 
lecture on data compression
Dr Rajiv Srivastava
 
Topic : X.25, Frame relay and ATM
Dr Rajiv Srivastava
 
Topic : B ISDN
Dr Rajiv Srivastava
 
Topic : ISDN(integrated services digital network) part 2
Dr Rajiv Srivastava
 
Topic: ISDN (Integrated Services Digital Network)
Dr Rajiv Srivastava
 
Topic: Virtual circuit & message switching
Dr Rajiv Srivastava
 
Topic Packet switching
Dr Rajiv Srivastava
 
Introduction to switching & circuit switching
Dr Rajiv Srivastava
 
Topic:Terminal handling & polling
Dr Rajiv Srivastava
 
Topic: Spread Spectrum
Dr Rajiv Srivastava
 
Applications of Time Division multiplexing : statistical TDM
Dr Rajiv Srivastava
 
Multiplexing : Wave Division Multiplexing
Dr Rajiv Srivastava
 
Multiplexing : FDM
Dr Rajiv Srivastava
 
Data Communication & Computer network: Shanon fano coding
Dr Rajiv Srivastava
 
Data Communication & Computer Networks : LZ algorithms
Dr Rajiv Srivastava
 

Recently uploaded (20)

PPTX
vedic maths in python:unleasing ancient wisdom with modern code
mistrymuskan14
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
Sourav Kr Podder
 
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
PPTX
Presentation on Janskhiya sthirata kosh.
Ms Usha Vadhel
 
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
mansk2
 
PDF
High Ground Student Revision Booklet Preview
jpinnuck
 
PPTX
Cardiovascular Pharmacology for pharmacy students.pptx
TumwineRobert
 
PPTX
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Mithil Fal Desai
 
PDF
Module 3: Health Systems Tutorial Slides S2 2025
Jonathan Hallett
 
PDF
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
PDF
Arihant Class 10 All in One Maths full pdf
sajal kumar
 
PPTX
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
PDF
The Picture of Dorian Gray summary and depiction
opaliyahemel
 
PDF
Landforms and landscapes data surprise preview
jpinnuck
 
PPTX
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
PPTX
Strengthening open access through collaboration: building connections with OP...
Jisc
 
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
vedic maths in python:unleasing ancient wisdom with modern code
mistrymuskan14
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
Open Quiz Monsoon Mind Game Prelims.pptx
Sourav Kr Podder
 
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
Presentation on Janskhiya sthirata kosh.
Ms Usha Vadhel
 
Week 4 Term 3 Study Techniques revisited.pptx
mansk2
 
High Ground Student Revision Booklet Preview
jpinnuck
 
Cardiovascular Pharmacology for pharmacy students.pptx
TumwineRobert
 
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Mithil Fal Desai
 
Module 3: Health Systems Tutorial Slides S2 2025
Jonathan Hallett
 
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
Arihant Class 10 All in One Maths full pdf
sajal kumar
 
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
The Picture of Dorian Gray summary and depiction
opaliyahemel
 
Landforms and landscapes data surprise preview
jpinnuck
 
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
Strengthening open access through collaboration: building connections with OP...
Jisc
 
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 

Data Communication & Computer Networks : LZW compression method

  • 1. Introduction to Data communication Topic : LZW compression method Lecture #15 Dr Rajiv Srivastava Director Sagar Institute of Research & Technology (SIRT) Sagar Group of Institutions, Bhopal http://www.sirtbhopal.ac.in
  • 3. LZW (Lempel-Ziv-welch) compression method • The LZW method to compress data is an evolution of the method originally created by Abraham Lempel and Jacob Ziv (Lempel-Ziv method). • Later the algorithm was improved by the two originators (called LZ77 and LZ 78). Terry welch further modified the algorithm and it is now called the LZW (Lempel-Ziv-welch) method.
  • 4. • The beauty of the method is that it is lossless compression method, in which the whole text can be totally recovered. The method is sometimes preferable to Huffman encoding because prior knowledge of the symbol frequencies is not required.
  • 5. Compression • The compression, which takes place at the sender site, has the following components : 1. a dictionary, 2. a buffer, and 3. an algorithm. Dictionary • To compress and decompress, LZW uses a dictionary made of two rows (or columns). The first row defines the code; the second row defines the string corresponding to that code.
  • 6. • Before compression begins, the dictionary is initialized with only the set of alphabet characters in the text. • For example, if the text consists of only three symbols , A, B, and C, the dictionary originally has only 3 columns, but it becomes larger and larger as the text is being compressed or decompressed. original dictionary for a three-symbol text. 1 2 3 A B C
  • 7. Buffer • LZW uses a buffer. The symbols enter the buffer from one side one by one. The strings are transferred to the dictionary and the corresponding code is sent out according to the algorithm discussed below. Buffer at the compression site Buffer String to dictionary Code sent Symbols from the text
  • 8. • Compression Algorithm • Figure shows the flowchart for the compression algorithm. • Example of Compression • Figure shows an example of compression using the LZW method. The input text, BABACABABA, is compressed to 214358 as follow.
  • 12. Decompression • The decompression process, which takes place at the receiver site, uses the same components as the compression. Dictionary • A very interesting point is that the sender does not send the dictionary created by the compression process; instead, the dictionary will be created at the receiver site and ,surprisingly, it is the exact replica of the dictionary created at the sender site. In other words, the information in the dictionary is somehow embedded in the codes transmitted.
  • 13. Buffer • The decompression process uses two buffers. The arriving codes are decoded and the resulting symbols are kept in a temporary buffer before entering, one symbol at a time, the main buffer. • Since each code may represent more than one symbol, the temporary buffer is needed to hold symbols before individual consumption by the main buffer (see figure G.4)
  • 14. • Buffer at the decompression site Buffer String to dictionary Symbols to be printed Code sent Temporary buffer
  • 15. • Decompression Algorithm • Figure G.5 shows the flowchart for the decompression algorithm. Our algorithm, which again is a very simplified version of the one in the literature, has two loops. • The first loop, in the iteration, decodes each code received and sends the resulting symbols to the temporary buffer. • The second loop reads the symbols one by one from the temporary buffer and eventually does the same thing as the compression algorithm.
  • 18. Thank You Dr Rajiv Srivastava Director Sagar Institute of Research & Technology (SIRT) Sagar Group of Institutions, Bhopal http://www.sirtbhopal.ac.in