SlideShare a Scribd company logo
Data CompressionData Compression
01/27/15 BY =VIKAS SINGH BHADOURIA
Why Data Compression?Why Data Compression?
Make optimal use of limited storage
space
Save time and help to optimize resources
 If compression and decompression are done in I/O processor, less time is
required to move data to or from storage subsystem, freeing I/O bus for
other work
 In sending data over communication line: less time to transmit and less
storage to host
01/27/15 BY =VIKAS SINGH BHADOURIA
Data Compression- EntropyData Compression- Entropy
Entropy is the measure of information content
in a message.
 Messages with higher entropy carry more information than
messages with lower entropy.
How to determine the entropy
 Find the probability p(x) of symbol x in the message
 The entropy H(x) of the symbol x is:
H(x) = - p(x) • log2p(x)
The average entropy over the entire message is
the sum of the entropy of all n symbols in the
message
01/27/15 BY =VIKAS SINGH BHADOURIA
Data Compression MethodsData Compression Methods
Data compression is about storing and sending
a smaller number of bits.
There’re two major categories for methods to
compress data: lossless and lossy methods
01/27/15 BY =VIKAS SINGH BHADOURIA
Lossless Compression MethodsLossless Compression Methods
In lossless methods, original data and the data
after compression and decompression are
exactly the same.
Redundant data is removed in compression and
added during decompression.
Lossless methods are used when we can’t
afford to lose any data: legal and medical
documents, computer programs.
01/27/15 BY =VIKAS SINGH BHADOURIA
Run-length encodingRun-length encoding
 Simplest method of compression.
 How: replace consecutive repeating occurrences of a symbol by 1
occurrence of the symbol itself, then followed by the number of
occurrences.
 The method can be more efficient if the data uses only 2 symbols
(0s and 1s) in bit patterns and 1 symbol is more frequent than
another.
01/27/15 BY =VIKAS SINGH BHADOURIA
Huffman CodingHuffman Coding
 Assign fewer bits to symbols that occur more
frequently and more bits to symbols appear less often.
 There’s no unique Huffman code and every Huffman
code has the same average code length.
 Algorithm:
a. Make a leaf node for each code symbol
Add the generation probability of each symbol to the leaf node
a. Take the two leaf nodes with the smallest probability and connect
them into a new node
Add 1 or 0 to each of the two branches
The probability of the new node is the sum of the probabilities of
the two connecting nodes
a. If there is only one node left, the code construction is completed. If
not, go back to (2)
01/27/15 BY =VIKAS SINGH BHADOURIA
Huffman CodingHuffman Coding
 Example
01/27/15 BY =VIKAS SINGH BHADOURIA
Huffman CodingHuffman Coding
 Encoding
 Decoding
01/27/15 BY =VIKAS SINGH BHADOURIA
Lempel Ziv EncodingLempel Ziv Encoding
It is dictionary-based encoding
Basic idea:
 Create a dictionary(a table) of strings used during
communication.
 If both sender and receiver have a copy of the
dictionary, then previously-encountered strings can
be substituted by their index in the dictionary.
01/27/15 BY =VIKAS SINGH BHADOURIA
Lempel Ziv CompressionLempel Ziv Compression
Have 2 phases:
 Building an indexed dictionary
 Compressing a string of symbols
• Algorithm:
 Extract the smallest substring that cannot be found
in the remaining uncompressed string.
 Store that substring in the dictionary as a new
entry and assign it an index value
 Substring is replaced with the index found in the
dictionary
 Insert the index and the last character of the
substring into the compressed string
01/27/15 BY =VIKAS SINGH BHADOURIA
Lempel Ziv CompressionLempel Ziv Compression
 Compression
example:
01/27/15 BY =VIKAS SINGH BHADOURIA
Audio EncodingAudio Encoding
Predictive encoding
 Only the differences
01/27/15 BY =VIKAS SINGH BHADOURIA
Lempel Ziv DecompressionLempel Ziv Decompression
 It’s just the inverse
of compression process
01/27/15 BY =VIKAS SINGH BHADOURIA
Lossy Compression MethodsLossy Compression Methods
Used for compressing images and video files
(our eyes cannot distinguish subtle changes, so
lossy data is acceptable).
These methods are cheaper, less time and
space.
Several methods:
 JPEG: compress pictures and graphics
 MPEG: compress video
 MP3: compress audio
01/27/15 BY =VIKAS SINGH BHADOURIA
JPEG EncodingJPEG Encoding
Used to compress pictures and graphics.
In JPEG, a grayscale picture is divided into 8x8
pixel blocks to decrease the number of
calculations.
Basic idea:
 Change the picture into a linear (vector) sets of numbers that
reveals the redundancies.
 The redundancies is then removed by one of lossless
compression methods.
01/27/15 BY =VIKAS SINGH BHADOURIA
JPEG Encoding- DCTJPEG Encoding- DCT
 DCT: Discrete Concise Transform
 DCT transforms the 64 values in 8x8 pixel block in a
way that the relative relationships between pixels are
kept but the redundancies are revealed.
 Example:
A gradient grayscale
01/27/15 BY =VIKAS SINGH BHADOURIA
Quantization & CompressionQuantization & Compression
Quantization:
 After T table is created, the values are quantized to reduce
the number of bits needed for encoding.
 Quantization divides the number of bits by a constant, then
drops the fraction. This is done to optimize the number of
bits and the number of 0s for each particular application.
• Compression:
 Quantized values are read from the table and redundant 0s
are removed.
 To cluster the 0s together, the table is read diagonally in an
zigzag fashion. The reason is if the table doesn’t have fine
changes, the bottom right corner of the table is all 0s.
 JPEG usually uses lossless run-length encoding at the
compression phase.
01/27/15 BY =VIKAS SINGH BHADOURIA
JPEG EncodingJPEG Encoding
01/27/15 BY =VIKAS SINGH BHADOURIA
MPEG EncodingMPEG Encoding
Used to compress video.
Basic idea:
 Each video is a rapid sequence of a set of frames.
Each frame is a spatial combination of pixels, or a
picture.
 Compressing video =
spatially compressing each frame
+
temporally compressing a set of frames.
01/27/15 BY =VIKAS SINGH BHADOURIA
MPEG EncodingMPEG Encoding
Spatial Compression
 Each frame is spatially compressed by JPEG.
• Temporal Compression
 Redundant frames are removed.
 For example, in a static scene in which someone is talking,
most frames are the same except for the segment around the
speaker’s lips, which changes from one frame to the next.
01/27/15 BY =VIKAS SINGH BHADOURIA
Audio CompressionAudio Compression
Used for speech or music
 Speech: compress a 64 kHz digitized signal
 Music: compress a 1.411 MHz signal
• Two categories of techniques:
 Predictive encoding
 Perceptual encoding
01/27/15 BY =VIKAS SINGH BHADOURIA
Audio EncodingAudio Encoding
Predictive Encoding
 Only the differences between samples are encoded,
not the whole sample values.
 Several standards: GSM (13 kbps), G.729 (8 kbps),
and G.723.3 (6.4 or 5.3 kbps)
• Perceptual Encoding: MP3
 CD-quality audio needs at least 1.411 Mbps and
cannot be sent over the Internet without
compression.
 MP3 (MPEG audio layer 3) uses perceptual
encoding technique to compress audio.
01/27/15 BY =VIKAS SINGH BHADOURIA
ReferencesReferences
http://www.csie.kuas.edu.tw/course/cs/english/ch-1
CS157B-Lecture 19 by Professor Lee
http://cs.sjsu.edu/~lee/cs157b/cs157b.html
“The essentials of computer organization
and architecture” by Linda Null and Julia
Nobur.
01/27/15 BY =VIKAS SINGH BHADOURIA
Data CompressionData Compression
QUESTION?
01/27/15 BY =VIKAS SINGH BHADOURIA

More Related Content

What's hot

Chapter 5 - Data Compression
Chapter 5 - Data CompressionChapter 5 - Data Compression
Chapter 5 - Data Compression
Pratik Pradhan
 
Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)
Project Student
 
Video Compression
Video CompressionVideo Compression
Video Compression
Shreyash Patel
 
Data compression
Data compression Data compression
Data compression
Muhammad Irtiza
 
MPEG video compression standard
MPEG video compression standardMPEG video compression standard
MPEG video compression standard
anuragjagetiya
 
Multimedia synchronization
Multimedia synchronizationMultimedia synchronization
Multimedia synchronization
I World Tech
 
Data compression
Data compressionData compression
Data compression
Sir Issac Newton COllege
 
Introduction to Image Compression
Introduction to Image CompressionIntroduction to Image Compression
Introduction to Image Compression
Kalyan Acharjya
 
Presentation of Lossy compression
Presentation of Lossy compressionPresentation of Lossy compression
Presentation of Lossy compression
Omar Ghazi
 
Multimedia:Multimedia compression
Multimedia:Multimedia compression Multimedia:Multimedia compression
Multimedia:Multimedia compression
St Mary's College,Thrissur,Kerala
 
Interpixel redundancy
Interpixel redundancyInterpixel redundancy
Interpixel redundancy
Naveen Kumar
 
Image compression
Image compression Image compression
Image compression
GARIMA SHAKYA
 
Digital video
Digital videoDigital video
Digital video
lavanya marichamy
 
Discrete cosine transform
Discrete cosine transform   Discrete cosine transform
Discrete cosine transform
Rashmi Karkra
 
Audio compression
Audio compressionAudio compression
Audio compression
priyanka pandey
 
video compression techique
video compression techiquevideo compression techique
video compression techique
Ashish Kumar
 
Bit plane coding
Bit plane codingBit plane coding
Bit plane coding
priyadharshini murugan
 
Audio compression
Audio compressionAudio compression
Audio compression
Miled Othmen
 
MPEG/Audio Compression
MPEG/Audio CompressionMPEG/Audio Compression
MPEG/Audio Compression
Daniel Brewster
 
Vector quantization
Vector quantizationVector quantization
Vector quantization
Rajani Sharma
 

What's hot (20)

Chapter 5 - Data Compression
Chapter 5 - Data CompressionChapter 5 - Data Compression
Chapter 5 - Data Compression
 
Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)
 
Video Compression
Video CompressionVideo Compression
Video Compression
 
Data compression
Data compression Data compression
Data compression
 
MPEG video compression standard
MPEG video compression standardMPEG video compression standard
MPEG video compression standard
 
Multimedia synchronization
Multimedia synchronizationMultimedia synchronization
Multimedia synchronization
 
Data compression
Data compressionData compression
Data compression
 
Introduction to Image Compression
Introduction to Image CompressionIntroduction to Image Compression
Introduction to Image Compression
 
Presentation of Lossy compression
Presentation of Lossy compressionPresentation of Lossy compression
Presentation of Lossy compression
 
Multimedia:Multimedia compression
Multimedia:Multimedia compression Multimedia:Multimedia compression
Multimedia:Multimedia compression
 
Interpixel redundancy
Interpixel redundancyInterpixel redundancy
Interpixel redundancy
 
Image compression
Image compression Image compression
Image compression
 
Digital video
Digital videoDigital video
Digital video
 
Discrete cosine transform
Discrete cosine transform   Discrete cosine transform
Discrete cosine transform
 
Audio compression
Audio compressionAudio compression
Audio compression
 
video compression techique
video compression techiquevideo compression techique
video compression techique
 
Bit plane coding
Bit plane codingBit plane coding
Bit plane coding
 
Audio compression
Audio compressionAudio compression
Audio compression
 
MPEG/Audio Compression
MPEG/Audio CompressionMPEG/Audio Compression
MPEG/Audio Compression
 
Vector quantization
Vector quantizationVector quantization
Vector quantization
 

Similar to Data compression

Data Compression
Data CompressionData Compression
Data Compression
Shubham Bammi
 
2019188026 Data Compression (1) (1).pdf
2019188026 Data Compression  (1) (1).pdf2019188026 Data Compression  (1) (1).pdf
2019188026 Data Compression (1) (1).pdf
AbinayaC11
 
Mpeg 2
Mpeg 2Mpeg 2
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compression
murugan hari
 
4 data compression
4 data compression4 data compression
4 data compression
Rejin Thomas
 
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
chezhiyan chezhiyan
 
Data compression
Data compressionData compression
Data compression
Chaitanya Belhekar
 
Presentation on Image Compression
Presentation on Image Compression Presentation on Image Compression
Presentation on Image Compression
Fat Fish Marketing Pvt Ltd
 
lecture on data compression
lecture on data compressionlecture on data compression
lecture on data compression
Dr Rajiv Srivastava
 
10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf
PUSHKAR ARYA
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt
AllamJayaPrakash
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt
AllamJayaPrakash
 
Lzw coding technique for image compression
Lzw coding technique for image compressionLzw coding technique for image compression
Lzw coding technique for image compression
Tata Consultancy Services
 
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...
Smt. Indira Gandhi College of Engineering, Navi Mumbai, Mumbai
 
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
Helan4
 
ch15.ppt
ch15.pptch15.ppt
ch15.ppt
PUSHKAR ARYA
 
ch15.ppt
ch15.pptch15.ppt
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
sangusajjan
 
2
22
Dictionary Based Compression
Dictionary Based CompressionDictionary Based Compression
Dictionary Based Compression
anithabalaprabhu
 

Similar to Data compression (20)

Data Compression
Data CompressionData Compression
Data Compression
 
2019188026 Data Compression (1) (1).pdf
2019188026 Data Compression  (1) (1).pdf2019188026 Data Compression  (1) (1).pdf
2019188026 Data Compression (1) (1).pdf
 
Mpeg 2
Mpeg 2Mpeg 2
Mpeg 2
 
image basics and image compression
image basics and image compressionimage basics and image compression
image basics and image compression
 
4 data compression
4 data compression4 data compression
4 data 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
 
Data compression
Data compressionData compression
Data compression
 
Presentation on Image Compression
Presentation on Image Compression Presentation on Image Compression
Presentation on Image Compression
 
lecture on data compression
lecture on data compressionlecture on data compression
lecture on data compression
 
10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf10lecture10datacompression-171023182241.pdf
10lecture10datacompression-171023182241.pdf
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt
 
Lzw coding technique for image compression
Lzw coding technique for image compressionLzw coding technique for image compression
Lzw coding technique for image compression
 
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...
 
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
2.3 unit-ii-text-compression-a-outline-compression-techniques-run-length-codi...
 
ch15.ppt
ch15.pptch15.ppt
ch15.ppt
 
ch15.ppt
ch15.pptch15.ppt
ch15.ppt
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
 
2
22
2
 
Dictionary Based Compression
Dictionary Based CompressionDictionary Based Compression
Dictionary Based Compression
 

More from VIKAS SINGH BHADOURIA

Virtualization
VirtualizationVirtualization
Virtualization
VIKAS SINGH BHADOURIA
 
Wireless Hacking
Wireless HackingWireless Hacking
Wireless Hacking
VIKAS SINGH BHADOURIA
 
EDGE DETECTION
EDGE DETECTIONEDGE DETECTION
EDGE DETECTION
VIKAS SINGH BHADOURIA
 
TCP /IP
TCP /IPTCP /IP
Complete course on wireless
Complete course on wirelessComplete course on wireless
Complete course on wireless
VIKAS SINGH BHADOURIA
 
Principles of programming languages. Detail notes
Principles of programming languages. Detail notesPrinciples of programming languages. Detail notes
Principles of programming languages. Detail notes
VIKAS SINGH BHADOURIA
 
Network Security
Network  SecurityNetwork  Security
Network Security
VIKAS SINGH BHADOURIA
 
Improve your communication skills
Improve your communication skillsImprove your communication skills
Improve your communication skills
VIKAS SINGH BHADOURIA
 
Infrared spectroscopy
Infrared spectroscopy   Infrared spectroscopy
Infrared spectroscopy
VIKAS SINGH BHADOURIA
 
Speed detection-of-moving-vehicle-using-speed-cameras
Speed detection-of-moving-vehicle-using-speed-camerasSpeed detection-of-moving-vehicle-using-speed-cameras
Speed detection-of-moving-vehicle-using-speed-cameras
VIKAS SINGH BHADOURIA
 
Next generation graphics programming on xbox 360
Next generation graphics programming on xbox 360Next generation graphics programming on xbox 360
Next generation graphics programming on xbox 360
VIKAS SINGH BHADOURIA
 
Fingerprint based physical access control vehicle immobilizer
Fingerprint based physical access control vehicle immobilizer Fingerprint based physical access control vehicle immobilizer
Fingerprint based physical access control vehicle immobilizer
VIKAS SINGH BHADOURIA
 
Intelligent agents
Intelligent agentsIntelligent agents
Intelligent agents
VIKAS SINGH BHADOURIA
 
Interactive voice-response-system
Interactive voice-response-systemInteractive voice-response-system
Interactive voice-response-system
VIKAS SINGH BHADOURIA
 
Brain computer-interface-ppt
Brain computer-interface-pptBrain computer-interface-ppt
Brain computer-interface-ppt
VIKAS SINGH BHADOURIA
 
Trees
TreesTrees
Introduction to parallel computing
Introduction to parallel computingIntroduction to parallel computing
Introduction to parallel computing
VIKAS SINGH BHADOURIA
 
Bluetooth mobileip
Bluetooth mobileipBluetooth mobileip
Bluetooth mobileip
VIKAS SINGH BHADOURIA
 
Parallel computing persentation
Parallel computing persentationParallel computing persentation
Parallel computing persentation
VIKAS SINGH BHADOURIA
 
Full report on light peak technology
Full report on light peak technologyFull report on light peak technology
Full report on light peak technology
VIKAS SINGH BHADOURIA
 

More from VIKAS SINGH BHADOURIA (20)

Virtualization
VirtualizationVirtualization
Virtualization
 
Wireless Hacking
Wireless HackingWireless Hacking
Wireless Hacking
 
EDGE DETECTION
EDGE DETECTIONEDGE DETECTION
EDGE DETECTION
 
TCP /IP
TCP /IPTCP /IP
TCP /IP
 
Complete course on wireless
Complete course on wirelessComplete course on wireless
Complete course on wireless
 
Principles of programming languages. Detail notes
Principles of programming languages. Detail notesPrinciples of programming languages. Detail notes
Principles of programming languages. Detail notes
 
Network Security
Network  SecurityNetwork  Security
Network Security
 
Improve your communication skills
Improve your communication skillsImprove your communication skills
Improve your communication skills
 
Infrared spectroscopy
Infrared spectroscopy   Infrared spectroscopy
Infrared spectroscopy
 
Speed detection-of-moving-vehicle-using-speed-cameras
Speed detection-of-moving-vehicle-using-speed-camerasSpeed detection-of-moving-vehicle-using-speed-cameras
Speed detection-of-moving-vehicle-using-speed-cameras
 
Next generation graphics programming on xbox 360
Next generation graphics programming on xbox 360Next generation graphics programming on xbox 360
Next generation graphics programming on xbox 360
 
Fingerprint based physical access control vehicle immobilizer
Fingerprint based physical access control vehicle immobilizer Fingerprint based physical access control vehicle immobilizer
Fingerprint based physical access control vehicle immobilizer
 
Intelligent agents
Intelligent agentsIntelligent agents
Intelligent agents
 
Interactive voice-response-system
Interactive voice-response-systemInteractive voice-response-system
Interactive voice-response-system
 
Brain computer-interface-ppt
Brain computer-interface-pptBrain computer-interface-ppt
Brain computer-interface-ppt
 
Trees
TreesTrees
Trees
 
Introduction to parallel computing
Introduction to parallel computingIntroduction to parallel computing
Introduction to parallel computing
 
Bluetooth mobileip
Bluetooth mobileipBluetooth mobileip
Bluetooth mobileip
 
Parallel computing persentation
Parallel computing persentationParallel computing persentation
Parallel computing persentation
 
Full report on light peak technology
Full report on light peak technologyFull report on light peak technology
Full report on light peak technology
 

Recently uploaded

Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
Madhumitha Jayaram
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
nooriasukmaningtyas
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 

Recently uploaded (20)

Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Wearable antenna for antenna applications
Wearable antenna for antenna applicationsWearable antenna for antenna applications
Wearable antenna for antenna applications
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 

Data compression

  • 1. Data CompressionData Compression 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 2. Why Data Compression?Why Data Compression? Make optimal use of limited storage space Save time and help to optimize resources  If compression and decompression are done in I/O processor, less time is required to move data to or from storage subsystem, freeing I/O bus for other work  In sending data over communication line: less time to transmit and less storage to host 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 3. Data Compression- EntropyData Compression- Entropy Entropy is the measure of information content in a message.  Messages with higher entropy carry more information than messages with lower entropy. How to determine the entropy  Find the probability p(x) of symbol x in the message  The entropy H(x) of the symbol x is: H(x) = - p(x) • log2p(x) The average entropy over the entire message is the sum of the entropy of all n symbols in the message 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 4. Data Compression MethodsData Compression Methods Data compression is about storing and sending a smaller number of bits. There’re two major categories for methods to compress data: lossless and lossy methods 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 5. Lossless Compression MethodsLossless Compression Methods In lossless methods, original data and the data after compression and decompression are exactly the same. Redundant data is removed in compression and added during decompression. Lossless methods are used when we can’t afford to lose any data: legal and medical documents, computer programs. 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 6. Run-length encodingRun-length encoding  Simplest method of compression.  How: replace consecutive repeating occurrences of a symbol by 1 occurrence of the symbol itself, then followed by the number of occurrences.  The method can be more efficient if the data uses only 2 symbols (0s and 1s) in bit patterns and 1 symbol is more frequent than another. 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 7. Huffman CodingHuffman Coding  Assign fewer bits to symbols that occur more frequently and more bits to symbols appear less often.  There’s no unique Huffman code and every Huffman code has the same average code length.  Algorithm: a. Make a leaf node for each code symbol Add the generation probability of each symbol to the leaf node a. Take the two leaf nodes with the smallest probability and connect them into a new node Add 1 or 0 to each of the two branches The probability of the new node is the sum of the probabilities of the two connecting nodes a. If there is only one node left, the code construction is completed. If not, go back to (2) 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 8. Huffman CodingHuffman Coding  Example 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 9. Huffman CodingHuffman Coding  Encoding  Decoding 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 10. Lempel Ziv EncodingLempel Ziv Encoding It is dictionary-based encoding Basic idea:  Create a dictionary(a table) of strings used during communication.  If both sender and receiver have a copy of the dictionary, then previously-encountered strings can be substituted by their index in the dictionary. 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 11. Lempel Ziv CompressionLempel Ziv Compression Have 2 phases:  Building an indexed dictionary  Compressing a string of symbols • Algorithm:  Extract the smallest substring that cannot be found in the remaining uncompressed string.  Store that substring in the dictionary as a new entry and assign it an index value  Substring is replaced with the index found in the dictionary  Insert the index and the last character of the substring into the compressed string 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 12. Lempel Ziv CompressionLempel Ziv Compression  Compression example: 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 13. Audio EncodingAudio Encoding Predictive encoding  Only the differences 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 14. Lempel Ziv DecompressionLempel Ziv Decompression  It’s just the inverse of compression process 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 15. Lossy Compression MethodsLossy Compression Methods Used for compressing images and video files (our eyes cannot distinguish subtle changes, so lossy data is acceptable). These methods are cheaper, less time and space. Several methods:  JPEG: compress pictures and graphics  MPEG: compress video  MP3: compress audio 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 16. JPEG EncodingJPEG Encoding Used to compress pictures and graphics. In JPEG, a grayscale picture is divided into 8x8 pixel blocks to decrease the number of calculations. Basic idea:  Change the picture into a linear (vector) sets of numbers that reveals the redundancies.  The redundancies is then removed by one of lossless compression methods. 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 17. JPEG Encoding- DCTJPEG Encoding- DCT  DCT: Discrete Concise Transform  DCT transforms the 64 values in 8x8 pixel block in a way that the relative relationships between pixels are kept but the redundancies are revealed.  Example: A gradient grayscale 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 18. Quantization & CompressionQuantization & Compression Quantization:  After T table is created, the values are quantized to reduce the number of bits needed for encoding.  Quantization divides the number of bits by a constant, then drops the fraction. This is done to optimize the number of bits and the number of 0s for each particular application. • Compression:  Quantized values are read from the table and redundant 0s are removed.  To cluster the 0s together, the table is read diagonally in an zigzag fashion. The reason is if the table doesn’t have fine changes, the bottom right corner of the table is all 0s.  JPEG usually uses lossless run-length encoding at the compression phase. 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 19. JPEG EncodingJPEG Encoding 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 20. MPEG EncodingMPEG Encoding Used to compress video. Basic idea:  Each video is a rapid sequence of a set of frames. Each frame is a spatial combination of pixels, or a picture.  Compressing video = spatially compressing each frame + temporally compressing a set of frames. 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 21. MPEG EncodingMPEG Encoding Spatial Compression  Each frame is spatially compressed by JPEG. • Temporal Compression  Redundant frames are removed.  For example, in a static scene in which someone is talking, most frames are the same except for the segment around the speaker’s lips, which changes from one frame to the next. 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 22. Audio CompressionAudio Compression Used for speech or music  Speech: compress a 64 kHz digitized signal  Music: compress a 1.411 MHz signal • Two categories of techniques:  Predictive encoding  Perceptual encoding 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 23. Audio EncodingAudio Encoding Predictive Encoding  Only the differences between samples are encoded, not the whole sample values.  Several standards: GSM (13 kbps), G.729 (8 kbps), and G.723.3 (6.4 or 5.3 kbps) • Perceptual Encoding: MP3  CD-quality audio needs at least 1.411 Mbps and cannot be sent over the Internet without compression.  MP3 (MPEG audio layer 3) uses perceptual encoding technique to compress audio. 01/27/15 BY =VIKAS SINGH BHADOURIA
  • 24. ReferencesReferences http://www.csie.kuas.edu.tw/course/cs/english/ch-1 CS157B-Lecture 19 by Professor Lee http://cs.sjsu.edu/~lee/cs157b/cs157b.html “The essentials of computer organization and architecture” by Linda Null and Julia Nobur. 01/27/15 BY =VIKAS SINGH BHADOURIA