SlideShare a Scribd company logo
1 of 24
T e k n i k P e n g k o d e a n
Pentransmisian Symbol
Himpunan event an probabilitas
Main Compression Techniques and
Compression performance
• Data compression is often called coding due to the fact that its
aim is to find a specific short (or shorter) way of representing
data.
• Encoding and decoding are used to mean compression and
decompression respectively.
• We outline some major compression algorithms below:
1. Run-length coding
2. Quantisation
3. Statistical coding
4. Dictionary-based coding
5. Transform-based coding
6. Motion prediction.
Run-length coding
The idea of Run-length coding is to replace consecutively
repeated symbols in a source with a code pair which
consists of either the repeating symbol and the number of
its occurrences, or sequence of non-repeating symbols.
Example 1.1
String ABBBBBBBCC can be represented by Ar7Br2C, where
r7 and r2 means 7 and 2 occurrences respectively.
All the symbols are represented by an 8-bit ASCII codeword.
The basic idea of quantisation is to apply a certain
computation to a set of data in order to achieve an
approximation in a simpler form.
Quantisation
Example 1.2
Consider storing a set of integers (7, 223, 15, 28, 64, 37,
145). Let x be an integer in the set. We have 7 ≤ x ≤ 223.
Since 0 < x < 255 and 2 8 = 256, it needs 8 binary bits to
represent each integer above.
However, if we use a multiple, say 16, as a common divider to apply to each
integer and round its value to the nearest integer, the above set becomes
(0, 14, 1, 2, 4, 2, 9) after applying the computation x div 16. Now each
integer can be stored in 4 bits, since the maximum number 14 is less than 2
Example 1.3
We can code the more frequently occurring symbols with
fewer bits. The statistical information can be obtained by
simply counting the frequency of each character in a file.
Alternatively, we can simply use the probability of each
character.
Statistical coding
The idea of statistical coding is to use statistical
information to replace a fixed-size code of symbols by a,
hopefully, shorter variable-sized code.
The dictionary approach consists of the
following main steps:
Dictionary-based coding
1. read the file
2. find the frequently occurring sequences of
symbols (FOSSs)
3. build up a dictionary of these FOSSs
4. associate each sequence with an index (usually a
fixed length code)
5. replace the FOSS occurrences with the indices.
• The transform-based approach models data by
mathematical functions, usually by periodic functions such
as cos(x) and applies mathematical rules to primarily diffuse
data.
• The idea is to change a mathematical quantity such as a
sequence of numbers to another form with useful features.
• It is used mainly in lossy compression algorithms involving
the following activities:
• analysing the signal (sound, picture etc.)
• decomposing it into frequency components
• making use of the limitations of human perception.
Transform-based coding
• Motion prediction techniques are lossy compression for
sound and moving images.
• Here we replace objects (say, an 8 ×8 block of pixels) in
frames with references to the same object (at a slightly
different position) in the previous frame.
Motion Prediction
• In this course, we view data compression as algorithmic
problems.
• We are mainly interested in compression algorithms for various
types of data.
• There are two classes of compression problems of interest
(Davisson and Gray 1976):
• Distortion-rate problem
Given a constraint on transmitted data rate or storage capacity, the problem is to
compress the source at, or below, this rate but at the highest fidelity possible.
Compression in areas of voice mail, digital cellular mobile radio and video
conferencing are examples of the distortion-rate problems.
• Rate-distortion problem
Given the requirement to achieve a certain pre-specified fidelity, the
problem is to meet the requirements with as few bits per second as
possible.
Compression in areas of CD-quality audio and motion-picture-quality video are
examples of rate-distortion problems.
Compression problems
• In areas of data compression studies, we essentially need
to analyse the characteristics of the data to be
compressed and hope to deduce some patterns in order
to achieve a compact representation.
• This gives rise to a variety of data modelling and
representation techniques, which are at the heart of
compression techniques.
• Therefore, there is no ‘one size fits all’ solution for data
compression problems.
Algorithmic solutions
• Due to the nature of data compression, any compression algorithm will not
work unless a decompression approach is also provided.
• We may use the term compression algorithm to actually mean both
compression algorithm and the decompression algorithm.
• In this subject, we sometimes do not discuss the decompression algorithm
when the decompression process is obvious or can be easily derived from the
compression process. However, you should always make sure that you know
the decompression solutions.
• In many cases, the efficiency of the decompression algorithm is of more
concern than that of the compression algorithm.
• For example, movies, photos, and audio data are often compressed once
by the artist and then decompressed many times by millions of viewers.
• However, the efficiency of compression is sometimes more important. For
example, programs may record audio or video files directly to computer
storage.
Compression and decompression
• The performance of a compression algorithm can be measured by various criteria. It
depends on what is our priority concern. In this subject guide, we are mainly concerned
with the effect that a compression makes (i.e. the difference in size of the input file before
the compression and the size of the output after the compression).
• It is difficult to measure the performance of a compression algorithm in general because
its compression behaviour depends much on whether the data contains the right patterns
that the algorithm looks for.
• The easiest way to measure the effect of a compression is to use the compression ratio.
• There are several ways of measuring the compression effect:
• Compression ratio. This is simply the ratio of size.after.compression to
size.before.compression or Compression ratio = size.after.compression
size.before.compression
• Compression factor. This is the reverse of compression ratio. Compression factor =
size.before.compression size.after.compression
• Saving percentage. This shows the shrinkage as a percentage. Saving percentage =
size.before.compression − size.after.compression size.before.compression % Note:
some books (e.g. Sayood(2000)) defines the compression ratio as our compression
factor.
Compression performance
Example 1.4
• A source image file (pixels 256 × 256)
with 65,536 bytes is compressed into
a file with 16,384 bytes.
• The compression ratio is 1/4 and the
compression factor is 4.
• The saving percentage is: 75%

More Related Content

Similar to Main Compression Techniques and Their Performance

Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compressionM.k. Praveen
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and videosangusajjan
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.pptAllamJayaPrakash
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.pptAllamJayaPrakash
 
data compression technique
data compression techniquedata compression technique
data compression techniqueCHINMOY PAUL
 
Charter1 material
Charter1 materialCharter1 material
Charter1 materialBarad Dipa
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniquesDeep Bhatt
 
Lossless Data Compression Using Rice Algorithm Based On Curve Fitting Technique
Lossless Data Compression Using Rice Algorithm Based On Curve Fitting TechniqueLossless Data Compression Using Rice Algorithm Based On Curve Fitting Technique
Lossless Data Compression Using Rice Algorithm Based On Curve Fitting TechniqueIRJET Journal
 
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
 
A Study of Image Compression Methods
A Study of Image Compression MethodsA Study of Image Compression Methods
A Study of Image Compression MethodsIOSR Journals
 
Design of Image Compression Algorithm using MATLAB
Design of Image Compression Algorithm using MATLABDesign of Image Compression Algorithm using MATLAB
Design of Image Compression Algorithm using MATLABIJEEE
 
dc module1 part 1.pptx
dc module1 part 1.pptxdc module1 part 1.pptx
dc module1 part 1.pptxAzmiNizar1
 

Similar to Main Compression Techniques and Their Performance (20)

Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compression
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
 
Image compression
Image compressionImage compression
Image compression
 
Data compression
Data compression Data compression
Data compression
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt
 
111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt111111111111111111111111111111111789.ppt
111111111111111111111111111111111789.ppt
 
Data compression
Data compressionData compression
Data compression
 
data compression technique
data compression techniquedata compression technique
data compression technique
 
Ijrdtvlis11 140006
Ijrdtvlis11 140006Ijrdtvlis11 140006
Ijrdtvlis11 140006
 
Charter1 material
Charter1 materialCharter1 material
Charter1 material
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniques
 
Presentation on Image Compression
Presentation on Image Compression Presentation on Image Compression
Presentation on Image Compression
 
Source coding
Source codingSource coding
Source coding
 
Lossless Data Compression Using Rice Algorithm Based On Curve Fitting Technique
Lossless Data Compression Using Rice Algorithm Based On Curve Fitting TechniqueLossless Data Compression Using Rice Algorithm Based On Curve Fitting Technique
Lossless Data Compression Using Rice Algorithm Based On Curve Fitting Technique
 
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
 
Image Compression Techniques: A Survey
Image Compression Techniques: A SurveyImage Compression Techniques: A Survey
Image Compression Techniques: A Survey
 
Image compression
Image compressionImage compression
Image compression
 
A Study of Image Compression Methods
A Study of Image Compression MethodsA Study of Image Compression Methods
A Study of Image Compression Methods
 
Design of Image Compression Algorithm using MATLAB
Design of Image Compression Algorithm using MATLABDesign of Image Compression Algorithm using MATLAB
Design of Image Compression Algorithm using MATLAB
 
dc module1 part 1.pptx
dc module1 part 1.pptxdc module1 part 1.pptx
dc module1 part 1.pptx
 

More from zulhelmanz

Audio Compression_2023.pptx
Audio Compression_2023.pptxAudio Compression_2023.pptx
Audio Compression_2023.pptxzulhelmanz
 
Pendahuluan (12) (1).pptx
Pendahuluan (12) (1).pptxPendahuluan (12) (1).pptx
Pendahuluan (12) (1).pptxzulhelmanz
 
1_Pengantar Komunikasi Data (9).pptx
1_Pengantar Komunikasi Data (9).pptx1_Pengantar Komunikasi Data (9).pptx
1_Pengantar Komunikasi Data (9).pptxzulhelmanz
 
CS553_ST7_Ch09-SpreadSpectrum 23.pptx
CS553_ST7_Ch09-SpreadSpectrum 23.pptxCS553_ST7_Ch09-SpreadSpectrum 23.pptx
CS553_ST7_Ch09-SpreadSpectrum 23.pptxzulhelmanz
 
routing 23.pptx
routing 23.pptxrouting 23.pptx
routing 23.pptxzulhelmanz
 
Media Transmisi_23.pptx
Media Transmisi_23.pptxMedia Transmisi_23.pptx
Media Transmisi_23.pptxzulhelmanz
 
DLC_23 (3).pptx
DLC_23 (3).pptxDLC_23 (3).pptx
DLC_23 (3).pptxzulhelmanz
 
Quality of service (qo s) 2021
Quality of service (qo s) 2021Quality of service (qo s) 2021
Quality of service (qo s) 2021zulhelmanz
 

More from zulhelmanz (9)

MPEG_23.pptx
MPEG_23.pptxMPEG_23.pptx
MPEG_23.pptx
 
Audio Compression_2023.pptx
Audio Compression_2023.pptxAudio Compression_2023.pptx
Audio Compression_2023.pptx
 
Pendahuluan (12) (1).pptx
Pendahuluan (12) (1).pptxPendahuluan (12) (1).pptx
Pendahuluan (12) (1).pptx
 
1_Pengantar Komunikasi Data (9).pptx
1_Pengantar Komunikasi Data (9).pptx1_Pengantar Komunikasi Data (9).pptx
1_Pengantar Komunikasi Data (9).pptx
 
CS553_ST7_Ch09-SpreadSpectrum 23.pptx
CS553_ST7_Ch09-SpreadSpectrum 23.pptxCS553_ST7_Ch09-SpreadSpectrum 23.pptx
CS553_ST7_Ch09-SpreadSpectrum 23.pptx
 
routing 23.pptx
routing 23.pptxrouting 23.pptx
routing 23.pptx
 
Media Transmisi_23.pptx
Media Transmisi_23.pptxMedia Transmisi_23.pptx
Media Transmisi_23.pptx
 
DLC_23 (3).pptx
DLC_23 (3).pptxDLC_23 (3).pptx
DLC_23 (3).pptx
 
Quality of service (qo s) 2021
Quality of service (qo s) 2021Quality of service (qo s) 2021
Quality of service (qo s) 2021
 

Recently uploaded

Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 

Recently uploaded (20)

Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 

Main Compression Techniques and Their Performance

  • 1. T e k n i k P e n g k o d e a n
  • 3.
  • 4. Himpunan event an probabilitas
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. Main Compression Techniques and Compression performance • Data compression is often called coding due to the fact that its aim is to find a specific short (or shorter) way of representing data. • Encoding and decoding are used to mean compression and decompression respectively. • We outline some major compression algorithms below: 1. Run-length coding 2. Quantisation 3. Statistical coding 4. Dictionary-based coding 5. Transform-based coding 6. Motion prediction.
  • 10. Run-length coding The idea of Run-length coding is to replace consecutively repeated symbols in a source with a code pair which consists of either the repeating symbol and the number of its occurrences, or sequence of non-repeating symbols. Example 1.1 String ABBBBBBBCC can be represented by Ar7Br2C, where r7 and r2 means 7 and 2 occurrences respectively. All the symbols are represented by an 8-bit ASCII codeword.
  • 11.
  • 12.
  • 13. The basic idea of quantisation is to apply a certain computation to a set of data in order to achieve an approximation in a simpler form. Quantisation Example 1.2 Consider storing a set of integers (7, 223, 15, 28, 64, 37, 145). Let x be an integer in the set. We have 7 ≤ x ≤ 223. Since 0 < x < 255 and 2 8 = 256, it needs 8 binary bits to represent each integer above. However, if we use a multiple, say 16, as a common divider to apply to each integer and round its value to the nearest integer, the above set becomes (0, 14, 1, 2, 4, 2, 9) after applying the computation x div 16. Now each integer can be stored in 4 bits, since the maximum number 14 is less than 2
  • 14.
  • 15. Example 1.3 We can code the more frequently occurring symbols with fewer bits. The statistical information can be obtained by simply counting the frequency of each character in a file. Alternatively, we can simply use the probability of each character. Statistical coding The idea of statistical coding is to use statistical information to replace a fixed-size code of symbols by a, hopefully, shorter variable-sized code.
  • 16. The dictionary approach consists of the following main steps: Dictionary-based coding 1. read the file 2. find the frequently occurring sequences of symbols (FOSSs) 3. build up a dictionary of these FOSSs 4. associate each sequence with an index (usually a fixed length code) 5. replace the FOSS occurrences with the indices.
  • 17. • The transform-based approach models data by mathematical functions, usually by periodic functions such as cos(x) and applies mathematical rules to primarily diffuse data. • The idea is to change a mathematical quantity such as a sequence of numbers to another form with useful features. • It is used mainly in lossy compression algorithms involving the following activities: • analysing the signal (sound, picture etc.) • decomposing it into frequency components • making use of the limitations of human perception. Transform-based coding
  • 18. • Motion prediction techniques are lossy compression for sound and moving images. • Here we replace objects (say, an 8 ×8 block of pixels) in frames with references to the same object (at a slightly different position) in the previous frame. Motion Prediction
  • 19.
  • 20. • In this course, we view data compression as algorithmic problems. • We are mainly interested in compression algorithms for various types of data. • There are two classes of compression problems of interest (Davisson and Gray 1976): • Distortion-rate problem Given a constraint on transmitted data rate or storage capacity, the problem is to compress the source at, or below, this rate but at the highest fidelity possible. Compression in areas of voice mail, digital cellular mobile radio and video conferencing are examples of the distortion-rate problems. • Rate-distortion problem Given the requirement to achieve a certain pre-specified fidelity, the problem is to meet the requirements with as few bits per second as possible. Compression in areas of CD-quality audio and motion-picture-quality video are examples of rate-distortion problems. Compression problems
  • 21. • In areas of data compression studies, we essentially need to analyse the characteristics of the data to be compressed and hope to deduce some patterns in order to achieve a compact representation. • This gives rise to a variety of data modelling and representation techniques, which are at the heart of compression techniques. • Therefore, there is no ‘one size fits all’ solution for data compression problems. Algorithmic solutions
  • 22. • Due to the nature of data compression, any compression algorithm will not work unless a decompression approach is also provided. • We may use the term compression algorithm to actually mean both compression algorithm and the decompression algorithm. • In this subject, we sometimes do not discuss the decompression algorithm when the decompression process is obvious or can be easily derived from the compression process. However, you should always make sure that you know the decompression solutions. • In many cases, the efficiency of the decompression algorithm is of more concern than that of the compression algorithm. • For example, movies, photos, and audio data are often compressed once by the artist and then decompressed many times by millions of viewers. • However, the efficiency of compression is sometimes more important. For example, programs may record audio or video files directly to computer storage. Compression and decompression
  • 23. • The performance of a compression algorithm can be measured by various criteria. It depends on what is our priority concern. In this subject guide, we are mainly concerned with the effect that a compression makes (i.e. the difference in size of the input file before the compression and the size of the output after the compression). • It is difficult to measure the performance of a compression algorithm in general because its compression behaviour depends much on whether the data contains the right patterns that the algorithm looks for. • The easiest way to measure the effect of a compression is to use the compression ratio. • There are several ways of measuring the compression effect: • Compression ratio. This is simply the ratio of size.after.compression to size.before.compression or Compression ratio = size.after.compression size.before.compression • Compression factor. This is the reverse of compression ratio. Compression factor = size.before.compression size.after.compression • Saving percentage. This shows the shrinkage as a percentage. Saving percentage = size.before.compression − size.after.compression size.before.compression % Note: some books (e.g. Sayood(2000)) defines the compression ratio as our compression factor. Compression performance
  • 24. Example 1.4 • A source image file (pixels 256 × 256) with 65,536 bytes is compressed into a file with 16,384 bytes. • The compression ratio is 1/4 and the compression factor is 4. • The saving percentage is: 75%