SlideShare uma empresa Scribd logo
1 de 18
Submitted by:
Ashutosh Kawadkar
Mohammed Juned
Data Compression
Contents:
 Introduction
 Need for Data Compression
 Types of Compression
 Lossless Compression
 Lossy Compression
 Huffman Coding
 Applications
 Summary
Introduction
 What is Data compression?
 Data compression is a technique in which
information in the file is encoded in such a way
that it takes up less space.
Need for Data Compression
 Compression reduces the size of file:
a. To save space when storing it.
b. To save time when transmitting it.
c. Most files have lot of redundancy.
Continued….
 Who needs Compression?
 Parkinson’s Law: Data expands to fill available
space.
 Moore’s Law: # Transistors on a chip doubles
every 18-24 months.
 Text , images ,sounds ,videos ,etc.
Types of Compression
Lossless Compression
Lossy Compression
Origin
al
Data
Decompres
sor
(decoder)
Compresso
r
(encoder)
Compress
ed
data
Lossless Compression
A lossless compression algorithm eliminates only
redundant information, so one can easily recover
the data upon decompression of the file.
Lossless data compression is compression
without any loss of data quality. The
decompressed is replica of original file.
It is used when it is important that original and
decompressed data be identical.
Some image formats, notably PNG, use only
loseless compression, while those likes TIFF may
use either lossy or lossless methods.
Examples of LOSSLESS Methods
are:
 Run-length encoding
 Huffman encoding
 Lempel-Ziv-Welsh(LZW) method
Lossy Compression
 A Lossy compression method is one where that
compressing data and then decompressing it
retrieves data that may well be different from the
original, but close enough to be useful in some
way.
 The algorithm eliminates irrelevant data as well,
and permits only an approximate reconstruction
of original file.
 Lossy compression is dangerously attractive
because it can provide compression ratios of
100:1 and 200:1, depending on the type of
information being compressed. But the cost is
loss of data.
Examples of LOSSY Methods
are:
 PCM
 JPEG
 MPEG
JPEG-Compression (left to right:
decreasing quality setting results in a 8x8
block generation of pixels)
Huffman Coding
 Huffman coding compression technique involves
preliminary analysis of the frequency of
occurrence of symbols. Huffman technique
creates, for each symbol, a binary data code, the
length of which is inversely related to the
frequency of occurrence.
 In this technique we just add symbols at leaf node
and root of this leaf node given values of addition
of two leafs, and tree is generated.
 It gives us the best way for encoding any data
string using minimum bits.
Example:
 Consider a string ABRA KA DABRA.
 OCCURRENCE-
 A=5 Let A=010
 B=2 B=11
 R=2 K=00
 D=1 D=10
 K=1 R=011
Therefore, if we write the given string in Binary form then,
i.e. ABRAKADABRA
BINARY FORM….
01011011010000101001011011010
29 bits
Now apply Huffman coding logic:
Here, the weight of D and K is 1. As occurrence of both the characters
is 1 time. Therefore, the weight of parent node is 1+1=2 i.e.
Addition of weight oh two leaf nodes.
Similarly for other characters……
D K
2
0 1
Weight => 1 1
11
6
4 2
R
B
D K
A
0 1
0 1
0
0 1
1
Here, LHS nodes have
value = 0 and
RHS nodes have
value= 1
So,
from fig. the values will
be-
A=0
B=101
D=110
K=111
R=100
Now the representation of
string is-
0101100011101100101100
0
Tree diagram for given
string by
Huffman coding
5
2 2
1 1
Applications:
 Generic File Compression:
 Files- BZIP, GZIP, 7z
 Archives: PKZIP
 File Systems: NTFS, HFS+,ZFS.
• Multimedia:
 Images: GIF, JPEG.
 Sound: MP3
 Video: MPEG, DivX, HDTV
• Communication:
 Skype
 Databases
 Facebook, Youtube
Summary:
 Data Compression:
Is the substitution of frequently occurring data
items, or symbols with short code that requires
fewer bits for storage than the original symbols.
Saves space, but requires time to save and
extract. Success varies with types of data. Works
best on data with low spatial variability and limited
possible values. Works poorly on high spatial
variability data or continuous surface. Exploits
inherent redundancy and irrelevancy by
transforming a data file into a smaller one.
Multiple Choice Questions:
I. Which one of the image format uses only Lossless Data
Compression?
a. GIF
b. PNG
c. TIFF
d. JPEG
II. On which type of data, compression is not suitable…
a. Matrix
b. Highly spatial
c. Vector
d. None of these
Continued…
III. Which one of the following technique is irreversible in nature.
a. Run-length
b. PCM
c. Both a and b
d. None of these
IV. MPEG ______ type of compression.
a. Lossy compression
b. Lossless compression
c. Both
d. None of these

Mais conteúdo relacionado

Mais procurados

Data compression & Classification
Data compression & ClassificationData compression & Classification
Data compression & ClassificationKhulna University
 
Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)Project Student
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniquesDeep Bhatt
 
Data Communication & Computer network: Data compression
Data Communication & Computer network: Data compressionData Communication & Computer network: Data compression
Data Communication & Computer network: Data compressionDr Rajiv Srivastava
 
comparision of lossy and lossless image compression using various algorithm
comparision of lossy and lossless image compression using various algorithmcomparision of lossy and lossless image compression using various algorithm
comparision of lossy and lossless image compression using various algorithmchezhiyan chezhiyan
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standardsMazin Alwaaly
 
Video compression
Video compressionVideo compression
Video compressionDarkNight14
 
data compression technique
data compression techniquedata compression technique
data compression techniqueCHINMOY PAUL
 
Introduction to data compression.pptx
Introduction to data compression.pptxIntroduction to data compression.pptx
Introduction to data compression.pptxjesna40
 
MPEG video compression standard
MPEG video compression standardMPEG video compression standard
MPEG video compression standardanuragjagetiya
 
Dictionary Based Compression
Dictionary Based CompressionDictionary Based Compression
Dictionary Based Compressionanithabalaprabhu
 

Mais procurados (20)

lecture on data compression
lecture on data compressionlecture on data compression
lecture on data compression
 
Data compression & Classification
Data compression & ClassificationData compression & Classification
Data compression & Classification
 
Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)
 
Data compression
Data compressionData compression
Data compression
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniques
 
Data Communication & Computer network: Data compression
Data Communication & Computer network: Data compressionData Communication & Computer network: Data compression
Data Communication & Computer network: Data compression
 
Multimedia:Multimedia compression
Multimedia:Multimedia compression Multimedia:Multimedia compression
Multimedia:Multimedia compression
 
comparision of lossy and lossless image compression using various algorithm
comparision of lossy and lossless image compression using various algorithmcomparision of lossy and lossless image compression using various algorithm
comparision of lossy and lossless image compression using various algorithm
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standards
 
Video Compression
Video CompressionVideo Compression
Video Compression
 
Text compression
Text compressionText compression
Text compression
 
Compression techniques
Compression techniquesCompression techniques
Compression techniques
 
Audio and Video Compression
Audio and Video CompressionAudio and Video Compression
Audio and Video Compression
 
Video compression
Video compressionVideo compression
Video compression
 
data compression technique
data compression techniquedata compression technique
data compression technique
 
Audio compression
Audio compressionAudio compression
Audio compression
 
Introduction to data compression.pptx
Introduction to data compression.pptxIntroduction to data compression.pptx
Introduction to data compression.pptx
 
Compression
CompressionCompression
Compression
 
MPEG video compression standard
MPEG video compression standardMPEG video compression standard
MPEG video compression standard
 
Dictionary Based Compression
Dictionary Based CompressionDictionary Based Compression
Dictionary Based Compression
 

Semelhante a Data compression

A research paper_on_lossless_data_compre
A research paper_on_lossless_data_compreA research paper_on_lossless_data_compre
A research paper_on_lossless_data_compreLuisa Francisco
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layerSerious_SamSoul
 
Data representation
Data representationData representation
Data representationChingTing
 
10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdfPUSHKAR ARYA
 
Data compression algorithms
Data compression  algorithmsData compression  algorithms
Data compression algorithmsMohnishReddy1
 
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdfSHIVAM691605
 
VII Compression Introduction
VII Compression IntroductionVII Compression Introduction
VII Compression Introductionsangusajjan
 
FINAL PROJECT REPORT
FINAL PROJECT REPORTFINAL PROJECT REPORT
FINAL PROJECT REPORTDhrumil Shah
 
Image_Compression_Slide_Set_1.pptx
Image_Compression_Slide_Set_1.pptxImage_Compression_Slide_Set_1.pptx
Image_Compression_Slide_Set_1.pptxssuserd546c51
 
Sunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithmSunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithmDr Sandeep Kumar Poonia
 

Semelhante a Data compression (20)

Data Compression
Data CompressionData Compression
Data Compression
 
A research paper_on_lossless_data_compre
A research paper_on_lossless_data_compreA research paper_on_lossless_data_compre
A research paper_on_lossless_data_compre
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layer
 
Data representation
Data representationData representation
Data representation
 
Data representation
Data representationData representation
Data representation
 
Lec5 Compression
Lec5 CompressionLec5 Compression
Lec5 Compression
 
Data representation
Data representationData representation
Data representation
 
10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf
 
Data compression algorithms
Data compression  algorithmsData compression  algorithms
Data compression algorithms
 
Pbl1
Pbl1Pbl1
Pbl1
 
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
12_HuffmanhsjsjsjjsiejjssjjejsjCoding_pdf.pdf
 
Compressionbasics
CompressionbasicsCompressionbasics
Compressionbasics
 
VII Compression Introduction
VII Compression IntroductionVII Compression Introduction
VII Compression Introduction
 
FINAL PROJECT REPORT
FINAL PROJECT REPORTFINAL PROJECT REPORT
FINAL PROJECT REPORT
 
Presentation on Image Compression
Presentation on Image Compression Presentation on Image Compression
Presentation on Image Compression
 
Arithmetic Coding
Arithmetic CodingArithmetic Coding
Arithmetic Coding
 
Image compression
Image compressionImage compression
Image compression
 
Image_Compression_Slide_Set_1.pptx
Image_Compression_Slide_Set_1.pptxImage_Compression_Slide_Set_1.pptx
Image_Compression_Slide_Set_1.pptx
 
Sunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithmSunzip user tool for data reduction using huffman algorithm
Sunzip user tool for data reduction using huffman algorithm
 
Introduction Data Compression/ Data compression, modelling and coding,Image C...
Introduction Data Compression/ Data compression, modelling and coding,Image C...Introduction Data Compression/ Data compression, modelling and coding,Image C...
Introduction Data Compression/ Data compression, modelling and coding,Image C...
 

Último

EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxElton John Embodo
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsRommel Regala
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxJanEmmanBrigoli
 

Último (20)

EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World Politics
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
 

Data compression

  • 2. Contents:  Introduction  Need for Data Compression  Types of Compression  Lossless Compression  Lossy Compression  Huffman Coding  Applications  Summary
  • 3. Introduction  What is Data compression?  Data compression is a technique in which information in the file is encoded in such a way that it takes up less space.
  • 4. Need for Data Compression  Compression reduces the size of file: a. To save space when storing it. b. To save time when transmitting it. c. Most files have lot of redundancy.
  • 5. Continued….  Who needs Compression?  Parkinson’s Law: Data expands to fill available space.  Moore’s Law: # Transistors on a chip doubles every 18-24 months.  Text , images ,sounds ,videos ,etc.
  • 6. Types of Compression Lossless Compression Lossy Compression Origin al Data Decompres sor (decoder) Compresso r (encoder) Compress ed data
  • 7. Lossless Compression A lossless compression algorithm eliminates only redundant information, so one can easily recover the data upon decompression of the file. Lossless data compression is compression without any loss of data quality. The decompressed is replica of original file. It is used when it is important that original and decompressed data be identical. Some image formats, notably PNG, use only loseless compression, while those likes TIFF may use either lossy or lossless methods.
  • 8. Examples of LOSSLESS Methods are:  Run-length encoding  Huffman encoding  Lempel-Ziv-Welsh(LZW) method
  • 9. Lossy Compression  A Lossy compression method is one where that compressing data and then decompressing it retrieves data that may well be different from the original, but close enough to be useful in some way.  The algorithm eliminates irrelevant data as well, and permits only an approximate reconstruction of original file.  Lossy compression is dangerously attractive because it can provide compression ratios of 100:1 and 200:1, depending on the type of information being compressed. But the cost is loss of data.
  • 10. Examples of LOSSY Methods are:  PCM  JPEG  MPEG JPEG-Compression (left to right: decreasing quality setting results in a 8x8 block generation of pixels)
  • 11. Huffman Coding  Huffman coding compression technique involves preliminary analysis of the frequency of occurrence of symbols. Huffman technique creates, for each symbol, a binary data code, the length of which is inversely related to the frequency of occurrence.  In this technique we just add symbols at leaf node and root of this leaf node given values of addition of two leafs, and tree is generated.  It gives us the best way for encoding any data string using minimum bits.
  • 12. Example:  Consider a string ABRA KA DABRA.  OCCURRENCE-  A=5 Let A=010  B=2 B=11  R=2 K=00  D=1 D=10  K=1 R=011
  • 13. Therefore, if we write the given string in Binary form then, i.e. ABRAKADABRA BINARY FORM…. 01011011010000101001011011010 29 bits Now apply Huffman coding logic: Here, the weight of D and K is 1. As occurrence of both the characters is 1 time. Therefore, the weight of parent node is 1+1=2 i.e. Addition of weight oh two leaf nodes. Similarly for other characters…… D K 2 0 1 Weight => 1 1
  • 14. 11 6 4 2 R B D K A 0 1 0 1 0 0 1 1 Here, LHS nodes have value = 0 and RHS nodes have value= 1 So, from fig. the values will be- A=0 B=101 D=110 K=111 R=100 Now the representation of string is- 0101100011101100101100 0 Tree diagram for given string by Huffman coding 5 2 2 1 1
  • 15. Applications:  Generic File Compression:  Files- BZIP, GZIP, 7z  Archives: PKZIP  File Systems: NTFS, HFS+,ZFS. • Multimedia:  Images: GIF, JPEG.  Sound: MP3  Video: MPEG, DivX, HDTV • Communication:  Skype  Databases  Facebook, Youtube
  • 16. Summary:  Data Compression: Is the substitution of frequently occurring data items, or symbols with short code that requires fewer bits for storage than the original symbols. Saves space, but requires time to save and extract. Success varies with types of data. Works best on data with low spatial variability and limited possible values. Works poorly on high spatial variability data or continuous surface. Exploits inherent redundancy and irrelevancy by transforming a data file into a smaller one.
  • 17. Multiple Choice Questions: I. Which one of the image format uses only Lossless Data Compression? a. GIF b. PNG c. TIFF d. JPEG II. On which type of data, compression is not suitable… a. Matrix b. Highly spatial c. Vector d. None of these
  • 18. Continued… III. Which one of the following technique is irreversible in nature. a. Run-length b. PCM c. Both a and b d. None of these IV. MPEG ______ type of compression. a. Lossy compression b. Lossless compression c. Both d. None of these