SlideShare a Scribd company logo
Lecture 10
Data Compression
Dr Rajiv Srivastava
Director
Data Compression
• Data Compression is a reduction in the number of bits
needed to represent data. Compressing data can save
storage capacity, speed file transfer, and decrease costs
for storage hardware and network bandwidth.
• Data Compression refers to the reducing the number
of bits that need to be transmitted over
communication channel.
• Data Compression reduces the number of bits sent
• Data Compression becomes particularly important
when we send data with high size such as audio &
video
• Even with very fast transmission speed of data we
need to send data in short time. We need to
Compress data for this purpose.
• Virtually all form of data contain redundancy
i.e. it is the amount of wasted "space" used to
transmit certain data.
• By making use of more efficient data
representation methods, redundancy can be
reduced.
• Even 7 bit ASCII code has some redundancy in it.
• The goal of data compression is to represent an
information source (e.g. a data file, a speech signal,
an image, or a video signal) as accurately as
possible using the fewest number of bits.
Compression ratio
• Data compression ratio, also known as
compression power, is a term used to quantify the
reduction in data-representation size produced by a
data compression algorithm.
• The data compression ratio is analogous to the
physical compression ratio used to measure
physical compression of substances.
• Data compression ratio is defined as the ratio between
the uncompressed size and compressed size.
• Thus a representation that compresses a 10 MB file to
2MB has a compression ratio of 10/2 = 5, often notated
as an exploit ratio , 5:1 (read “five” to “one”) or as an
implicit ratio 5/1
• Note that this formulation applies equally for
compression, where the uncompressed size is that of the
original and for decompression, where the
uncompressed size is that of the reproduction.
• Sometimes the space saving is given instead,
which is defined as the reduction in size relative
to the uncompressed size.
•
• Thus a representation that compresses a 10 MB
file to 2 MB would yield a space saving of
1-2/10 = 0.8 often notated as a percentage,
80 %
• For signals of indefinite size , such as streaming
audio and video the compression ratio is
defined in terms of uncompressed and
compressed data rates instead of data sizes.
and instead of space savings , one speaks of
data-rate saving which is defined as the data-
rate reduction relative to the uncompressed
data rate.
• For example uncompressed songs in CD format
have a data rate of 16 bits /channel x 2 channel
x 44.1 kHz = 1.4 Mbits,
• AAC files on an iPod are typically compressed
to 128 kbits, yielding a compression ratio of
10.9 for data-rate saving of 0.91 or 91%.
Data Compression Methods
Lossy Compression
• Lossy Compression refers to data compression techniques in
which some amount of data is lost. Lossy compression
technologies attempt to eliminate redundant or unnecessary
information.
• If the decompressed information need not be an exact replica
of the original information but something very close, we can
use a lossy data compression method.
• lossy compression reduces a file by permanently eliminating
certain information, especially redundant information. When
the file is uncompressed, only a part of the original
information is still there (although the user may not notice it).
Lossy compression is generally used for video and sound,
where a certain amount of information loss will not be
detected by most users.
• The JPEG image file, commonly used for
photographs and other complex still images
on the Web, is an image that has lossy
compression. Using JPEG compression, the
creator can decide how much loss to
introduce and make a trade-off between file
size and image quality. Most video
compression technologies, such as MPEG, use
a lossy technique.
Lossy Compression Contd..
The best example is a videoconference where there is an
acceptable amount of frame loss in order to deliver the
image in real time. People may appear jerky in their
movements, but you still have a grasp for what is happening
on the other end of the conference.
In the case of graphics files, some resolution may be lost in
order to create a smaller file. The loss may be in the form of
color depth or graphic detail. For example, high-resolution
details can be lost if a picture is going to be displayed on a
low-resolution device. Loss is also acceptable in voice and
audio compression, depending on the desired quality.
These methods are called lossy compression
methods because we will lose some of the
original data in the process.
Several methods have been developed using
lossy compression techniques. Joint
photographic experts group (JPEG) is used to
compress pictures and graphics. Motion picture
experts group (MPEG) is used to compress
video.
High Compression (Low Quality)
Low Compression (High Quality)
Lossless Compression
• The lossless compression refers to data compression
techniques in which no data is lost.
• For most types of data, lossless compression techniques
can reduce the space needed by only about 50%.
• For greater compression, one must use a lossy compression
technique. Note, however, that only certain types of data -
graphics, audio, and video -- can tolerate lossy
compression.
• You must use a lossless compression technique when
compressing data and programs.
• The PKZIP compression technology is an example of lossless
compression.
• With lossless compression, every single bit of
data that was originally in the file remains after
the file is uncompressed. All of the information
is completely restored.
• This is generally the technique of choice for text
or spreadsheet files, where losing words or
financial data could pose a problem.
• The Graphics Interchange File (GIF) is an image
format used on the Web that provides lossless
compression.
• In Lossless Data Compression the compressing &
decompressing algorithm are usually the inverse of
each other. In other words after decompressing we
will get exact data as they were before
compressing. Nothing is lost. The following are
some techniques used in lossless data compression
1. Null compression
2. Run Length Encoding
3. Statistical Compression
• Shannon Fano Encoding
• Huffman Encoding
– Adaptive Compression (Adaptive Huffman)
• Dictionary Based Compression
» LZ77, LZ78 Algorithms
» Lempel Ziv Welch (LZW) encoding
1. Null compression Replaces a series of blank
spaces with a compression code, followed by a
value that represents the number of spaces.
Example : hello friend how is your life?
2. Run Length Encoding(RLE)
When data contain strings of repeated symbols (such as
bits or characters), the strings can be replaced by a
special marker, followed by the repeated symbol,
followed by the number of occurrences. For
example, in given Figure, the symbol # is the
marker. The symbol being repeated (the run
symbol) follows the marker.
After the run symbol, the number of occurrences
(length) is shown by a two-digit number.
Example : This run-length encoding method can be
used in audio (silence is a run of 0s) and video (run
of a picture element having the same brightness
and color).
Run-Length Encoding (RLE)
3. Statistical Compression
Another method of lossless compression is statistical
compression. This method uses short codes for frequent
symbols and long codes for infrequent symbols. In this way,
the length of the total data is reduced tremendously. The
following methods are very popular lossless compression
methods :
• Shannon Fano Encoding
• Huffman Encoding
– Adaptive Compression (Adaptive Huffman)
• Dictionary Based Compression
» LZ77, LZ78 Algorithms
» Lempel Ziv Welch (LZW) encoding
3. Relative Compression Another way of
reducing the number of bits is a method called
relative compression or differential encoding.
This is extremely useful if we are sending, for
example, video, Commercial TVs send 30
frames of 0s and 1s every second. However,
usually there is little difference between
consecutive frames. So, instead of sending an
entire frame, we send only the difference
between consecutive frames. The small
differences can be encoded into small streams
of bits.
Next Slides are for M Tech Course
Image Compression
• Grey code
• Error metrics
• Intuitive methods
• Image transforms
• Jpeg
Wavelet Methods
Video Compression
Audio Compression
• Dictionary based Compression Techniques
• Adaptive Compression
1. Adaptive Huffman coding : Its a variation of static
compression technique. The Adaptive Huffman
coding is the best example of this technique.
2. MNP5 :
• very popular and were used by many modems in the 1980s
and 1990s.
• The MNP5 method is a two-stage process that starts with
run-length encoding,
• followed by adaptive frequency encoding.
3. MNP7
• More complex and sophisticated than MNP5, MNP7 combines run-
length encoding with
• a two-dimensional variant of adaptive Huffman coding.

More Related Content

Similar to 10lecture10datacompression-171023182241.pdf

Media Encoding
Media Encoding Media Encoding
Media Encoding
Phillip Doyle
 
Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)
Project Student
 
Vste r2
Vste r2Vste r2
Vste r2
fijiflip
 
Image Processing in Android Environment AJCSE
Image Processing in Android Environment AJCSEImage Processing in Android Environment AJCSE
Image Processing in Android Environment AJCSE
BRNSSPublicationHubI
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layer
Serious_SamSoul
 
Seminar Report on image compression
Seminar Report on image compressionSeminar Report on image compression
Seminar Report on image compression
Pradip Kumar
 
Teknik Pengkodean (2).pptx
Teknik Pengkodean (2).pptxTeknik Pengkodean (2).pptx
Teknik Pengkodean (2).pptx
zulhelmanz
 
Audio and Video Compression
Audio and Video CompressionAudio and Video Compression
Audio and Video Compression
Er. Ashish Pandey
 
simple video compression
simple video compression simple video compression
simple video compression
LaLit DuBey
 
Video compression
Video compressionVideo compression
Video compression
DarkNight14
 
Data compression
Data compression Data compression
Data compression
Muhammad Irtiza
 
Dr.U.Priya, Head & Assistant Professor of Commerce, Bon Secours for Women, Th...
Dr.U.Priya, Head & Assistant Professor of Commerce, Bon Secours for Women, Th...Dr.U.Priya, Head & Assistant Professor of Commerce, Bon Secours for Women, Th...
Dr.U.Priya, Head & Assistant Professor of Commerce, Bon Secours for Women, Th...
PriyaU5
 
data compression technique
data compression techniquedata compression technique
data compression technique
CHINMOY PAUL
 
Video Compression
Video CompressionVideo Compression
Video Compression
Shreyash Patel
 
A presentation on video compression
A presentation on video compressionA presentation on video compression
A presentation on video compression
JubairHossain19
 
Data compression algorithms
Data compression  algorithmsData compression  algorithms
Data compression algorithms
MohnishReddy1
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and videosangusajjan
 
video comparison
video comparison video comparison
video comparison
Hassanein Alwan
 
1.1.3 DATA STORAGE
1.1.3 DATA STORAGE1.1.3 DATA STORAGE
1.1.3 DATA STORAGE
Buxoo Abdullah
 

Similar to 10lecture10datacompression-171023182241.pdf (20)

Media Encoding
Media Encoding Media Encoding
Media Encoding
 
Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)Data Compression (Lossy and Lossless)
Data Compression (Lossy and Lossless)
 
Vste r2
Vste r2Vste r2
Vste r2
 
Image Processing in Android Environment AJCSE
Image Processing in Android Environment AJCSEImage Processing in Android Environment AJCSE
Image Processing in Android Environment AJCSE
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layer
 
Seminar Report on image compression
Seminar Report on image compressionSeminar Report on image compression
Seminar Report on image compression
 
Chap55
Chap55Chap55
Chap55
 
Teknik Pengkodean (2).pptx
Teknik Pengkodean (2).pptxTeknik Pengkodean (2).pptx
Teknik Pengkodean (2).pptx
 
Audio and Video Compression
Audio and Video CompressionAudio and Video Compression
Audio and Video Compression
 
simple video compression
simple video compression simple video compression
simple video compression
 
Video compression
Video compressionVideo compression
Video compression
 
Data compression
Data compression Data compression
Data compression
 
Dr.U.Priya, Head & Assistant Professor of Commerce, Bon Secours for Women, Th...
Dr.U.Priya, Head & Assistant Professor of Commerce, Bon Secours for Women, Th...Dr.U.Priya, Head & Assistant Professor of Commerce, Bon Secours for Women, Th...
Dr.U.Priya, Head & Assistant Professor of Commerce, Bon Secours for Women, Th...
 
data compression technique
data compression techniquedata compression technique
data compression technique
 
Video Compression
Video CompressionVideo Compression
Video Compression
 
A presentation on video compression
A presentation on video compressionA presentation on video compression
A presentation on video compression
 
Data compression algorithms
Data compression  algorithmsData compression  algorithms
Data compression algorithms
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
 
video comparison
video comparison video comparison
video comparison
 
1.1.3 DATA STORAGE
1.1.3 DATA STORAGE1.1.3 DATA STORAGE
1.1.3 DATA STORAGE
 

Recently uploaded

Research 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdfResearch 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdf
ameli25062005
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
9a93xvy
 
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
ameli25062005
 
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
jyz59f4j
 
Common Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themCommon Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid them
madhavlakhanpal29
 
Top Israeli Products and Brands - Plan it israel.pdf
Top Israeli Products and Brands - Plan it israel.pdfTop Israeli Products and Brands - Plan it israel.pdf
Top Israeli Products and Brands - Plan it israel.pdf
PlanitIsrael
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
n0tivyq
 
Exploring the Future of Smart Garages.pdf
Exploring the Future of Smart Garages.pdfExploring the Future of Smart Garages.pdf
Exploring the Future of Smart Garages.pdf
fastfixgaragedoor
 
Transforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting ProfitabilityTransforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting Profitability
aaryangarg12
 
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
smpc3nvg
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
h7j5io0
 
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
gpffo76j
 
vernacular architecture in response to climate.pdf
vernacular architecture in response to climate.pdfvernacular architecture in response to climate.pdf
vernacular architecture in response to climate.pdf
PrabhjeetSingh219035
 
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
h7j5io0
 
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
asuzyq
 
Let's Summon Demons Shirt Let's Summon Demons Shirt
Let's Summon Demons Shirt Let's Summon Demons ShirtLet's Summon Demons Shirt Let's Summon Demons Shirt
Let's Summon Demons Shirt Let's Summon Demons Shirt
TeeFusion
 
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
smpc3nvg
 
7 Alternatives to Bullet Points in PowerPoint
7 Alternatives to Bullet Points in PowerPoint7 Alternatives to Bullet Points in PowerPoint
7 Alternatives to Bullet Points in PowerPoint
Alvis Oh
 
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
taqyed
 

Recently uploaded (20)

Research 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdfResearch 20 slides Amelia gavryliuks.pdf
Research 20 slides Amelia gavryliuks.pdf
 
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
一比一原版(CITY毕业证书)谢菲尔德哈勒姆大学毕业证如何办理
 
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
 
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
 
Common Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid themCommon Designing Mistakes and How to avoid them
Common Designing Mistakes and How to avoid them
 
Top Israeli Products and Brands - Plan it israel.pdf
Top Israeli Products and Brands - Plan it israel.pdfTop Israeli Products and Brands - Plan it israel.pdf
Top Israeli Products and Brands - Plan it israel.pdf
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
 
Exploring the Future of Smart Garages.pdf
Exploring the Future of Smart Garages.pdfExploring the Future of Smart Garages.pdf
Exploring the Future of Smart Garages.pdf
 
Transforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting ProfitabilityTransforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting Profitability
 
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
一比一原版(Bristol毕业证书)布里斯托大学毕业证成绩单如何办理
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
一比一原版(Bolton毕业证书)博尔顿大学毕业证成绩单如何办理
 
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
 
vernacular architecture in response to climate.pdf
vernacular architecture in response to climate.pdfvernacular architecture in response to climate.pdf
vernacular architecture in response to climate.pdf
 
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
一比一原版(UCB毕业证书)伯明翰大学学院毕业证成绩单如何办理
 
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
 
Let's Summon Demons Shirt Let's Summon Demons Shirt
Let's Summon Demons Shirt Let's Summon Demons ShirtLet's Summon Demons Shirt Let's Summon Demons Shirt
Let's Summon Demons Shirt Let's Summon Demons Shirt
 
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
一比一原版(Brunel毕业证书)布鲁内尔大学毕业证成绩单如何办理
 
7 Alternatives to Bullet Points in PowerPoint
7 Alternatives to Bullet Points in PowerPoint7 Alternatives to Bullet Points in PowerPoint
7 Alternatives to Bullet Points in PowerPoint
 
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
 

10lecture10datacompression-171023182241.pdf

  • 1. Lecture 10 Data Compression Dr Rajiv Srivastava Director
  • 2. Data Compression • Data Compression is a reduction in the number of bits needed to represent data. Compressing data can save storage capacity, speed file transfer, and decrease costs for storage hardware and network bandwidth. • Data Compression refers to the reducing the number of bits that need to be transmitted over communication channel. • Data Compression reduces the number of bits sent • Data Compression becomes particularly important when we send data with high size such as audio & video • Even with very fast transmission speed of data we need to send data in short time. We need to Compress data for this purpose.
  • 3. • Virtually all form of data contain redundancy i.e. it is the amount of wasted "space" used to transmit certain data. • By making use of more efficient data representation methods, redundancy can be reduced. • Even 7 bit ASCII code has some redundancy in it. • The goal of data compression is to represent an information source (e.g. a data file, a speech signal, an image, or a video signal) as accurately as possible using the fewest number of bits.
  • 4. Compression ratio • Data compression ratio, also known as compression power, is a term used to quantify the reduction in data-representation size produced by a data compression algorithm. • The data compression ratio is analogous to the physical compression ratio used to measure physical compression of substances.
  • 5. • Data compression ratio is defined as the ratio between the uncompressed size and compressed size. • Thus a representation that compresses a 10 MB file to 2MB has a compression ratio of 10/2 = 5, often notated as an exploit ratio , 5:1 (read “five” to “one”) or as an implicit ratio 5/1 • Note that this formulation applies equally for compression, where the uncompressed size is that of the original and for decompression, where the uncompressed size is that of the reproduction.
  • 6. • Sometimes the space saving is given instead, which is defined as the reduction in size relative to the uncompressed size. • • Thus a representation that compresses a 10 MB file to 2 MB would yield a space saving of 1-2/10 = 0.8 often notated as a percentage, 80 %
  • 7. • For signals of indefinite size , such as streaming audio and video the compression ratio is defined in terms of uncompressed and compressed data rates instead of data sizes. and instead of space savings , one speaks of data-rate saving which is defined as the data- rate reduction relative to the uncompressed data rate.
  • 8. • For example uncompressed songs in CD format have a data rate of 16 bits /channel x 2 channel x 44.1 kHz = 1.4 Mbits, • AAC files on an iPod are typically compressed to 128 kbits, yielding a compression ratio of 10.9 for data-rate saving of 0.91 or 91%.
  • 10. Lossy Compression • Lossy Compression refers to data compression techniques in which some amount of data is lost. Lossy compression technologies attempt to eliminate redundant or unnecessary information. • If the decompressed information need not be an exact replica of the original information but something very close, we can use a lossy data compression method. • lossy compression reduces a file by permanently eliminating certain information, especially redundant information. When the file is uncompressed, only a part of the original information is still there (although the user may not notice it). Lossy compression is generally used for video and sound, where a certain amount of information loss will not be detected by most users.
  • 11. • The JPEG image file, commonly used for photographs and other complex still images on the Web, is an image that has lossy compression. Using JPEG compression, the creator can decide how much loss to introduce and make a trade-off between file size and image quality. Most video compression technologies, such as MPEG, use a lossy technique.
  • 12. Lossy Compression Contd.. The best example is a videoconference where there is an acceptable amount of frame loss in order to deliver the image in real time. People may appear jerky in their movements, but you still have a grasp for what is happening on the other end of the conference. In the case of graphics files, some resolution may be lost in order to create a smaller file. The loss may be in the form of color depth or graphic detail. For example, high-resolution details can be lost if a picture is going to be displayed on a low-resolution device. Loss is also acceptable in voice and audio compression, depending on the desired quality.
  • 13. These methods are called lossy compression methods because we will lose some of the original data in the process. Several methods have been developed using lossy compression techniques. Joint photographic experts group (JPEG) is used to compress pictures and graphics. Motion picture experts group (MPEG) is used to compress video.
  • 14. High Compression (Low Quality) Low Compression (High Quality)
  • 15. Lossless Compression • The lossless compression refers to data compression techniques in which no data is lost. • For most types of data, lossless compression techniques can reduce the space needed by only about 50%. • For greater compression, one must use a lossy compression technique. Note, however, that only certain types of data - graphics, audio, and video -- can tolerate lossy compression. • You must use a lossless compression technique when compressing data and programs. • The PKZIP compression technology is an example of lossless compression.
  • 16. • With lossless compression, every single bit of data that was originally in the file remains after the file is uncompressed. All of the information is completely restored. • This is generally the technique of choice for text or spreadsheet files, where losing words or financial data could pose a problem. • The Graphics Interchange File (GIF) is an image format used on the Web that provides lossless compression.
  • 17. • In Lossless Data Compression the compressing & decompressing algorithm are usually the inverse of each other. In other words after decompressing we will get exact data as they were before compressing. Nothing is lost. The following are some techniques used in lossless data compression 1. Null compression 2. Run Length Encoding
  • 18. 3. Statistical Compression • Shannon Fano Encoding • Huffman Encoding – Adaptive Compression (Adaptive Huffman) • Dictionary Based Compression » LZ77, LZ78 Algorithms » Lempel Ziv Welch (LZW) encoding
  • 19. 1. Null compression Replaces a series of blank spaces with a compression code, followed by a value that represents the number of spaces. Example : hello friend how is your life?
  • 20. 2. Run Length Encoding(RLE) When data contain strings of repeated symbols (such as bits or characters), the strings can be replaced by a special marker, followed by the repeated symbol, followed by the number of occurrences. For example, in given Figure, the symbol # is the marker. The symbol being repeated (the run symbol) follows the marker. After the run symbol, the number of occurrences (length) is shown by a two-digit number. Example : This run-length encoding method can be used in audio (silence is a run of 0s) and video (run of a picture element having the same brightness and color).
  • 22. 3. Statistical Compression Another method of lossless compression is statistical compression. This method uses short codes for frequent symbols and long codes for infrequent symbols. In this way, the length of the total data is reduced tremendously. The following methods are very popular lossless compression methods : • Shannon Fano Encoding • Huffman Encoding – Adaptive Compression (Adaptive Huffman) • Dictionary Based Compression » LZ77, LZ78 Algorithms » Lempel Ziv Welch (LZW) encoding
  • 23. 3. Relative Compression Another way of reducing the number of bits is a method called relative compression or differential encoding. This is extremely useful if we are sending, for example, video, Commercial TVs send 30 frames of 0s and 1s every second. However, usually there is little difference between consecutive frames. So, instead of sending an entire frame, we send only the difference between consecutive frames. The small differences can be encoded into small streams of bits.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28. Next Slides are for M Tech Course
  • 29. Image Compression • Grey code • Error metrics • Intuitive methods • Image transforms • Jpeg
  • 33. • Dictionary based Compression Techniques
  • 34. • Adaptive Compression 1. Adaptive Huffman coding : Its a variation of static compression technique. The Adaptive Huffman coding is the best example of this technique. 2. MNP5 : • very popular and were used by many modems in the 1980s and 1990s. • The MNP5 method is a two-stage process that starts with run-length encoding, • followed by adaptive frequency encoding. 3. MNP7 • More complex and sophisticated than MNP5, MNP7 combines run- length encoding with • a two-dimensional variant of adaptive Huffman coding.