Main Techniques and Performance of Each Compression
Main Techniques and Performance of Each Compression
T.Sharon-A.Frank
Main Techniques and Performance of
each Compression
• 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.
• Some of the main compression algorithms:
1. Run-length coding
2. Quantisation
3. Statistical coding
4. Dictionary-based coding
5. Transform-based coding
6. Motion prediction.
1. 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
• String ABBBBBBBCC can be represented by Ar7Br2C,
where r7 and r2 means 7 and 2 occurrences
respectively.
7
5. Transform-based coding
• 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.
6. Motion prediction
15.16
Run-length encoding
15.17
Figure 15.2 Run-length encoding example
15.18
Figure 15.3 Run-length encoding for two symbols 15.19
Run Length Encoding (RLE)
10'0'
2'0' 6'1' 2'0'
3'0' 4'1' 3'0'
3'0' 4'1' 3'0'
3'0' 4'1' 3'0'
4'0' 2'1' 4'0'
4'0' 2'1' 4'0'
4'0' 2'1' 4'0'
1'0' 8'1' 1'0'
10'0'
T.Sharon-A.Frank
Two-dimensional RLE
10'0'
2'0' 6'1' 2'0'
3'0' 4'1' 3'0'
AGAIN
AGAIN
4'0' 2'1' 4'0'
AGAIN
AGAIN
1'0' 8'1' 1'0'
10'0'
T.Sharon-A.Frank
Link Praktek
https://www.mathcelebrity.com/
runlencode.php
https://www.csfieldguide.org.nz/en/interactives/run-
length-encoding/