Data Compression Techniques
Data Compression Techniques
COMPRESSION
TECHNIQUES
PRESENTED BY- DEBABRATA MOHANTA
Introduction
Data compression is a reduction in the number of bits needed to represent data.
Compression data can save storage ,capacity, speed up file transfer and decrease
costs for storage hardware and network bandwidth.
The aim of compression is reduce the quantity of the file size but to keep the
quality of the original data.
Compression Techniques
There are two categories of compression techniques used with digital graphics.
Lossless Compression
In lossless data compression, the integrity of the data is preserved. The original
data and the data after compression and decompression are exactly the same
because, in these methods, the compression and decompression algorithms are
exact inverses of each other: no part of the data is lost in the process.
The method can be even more efficient if the data uses only two symbols (for
example 0 and 1) in its bit pattern and one symbol is more frequent than the other.
Huffman Coding
Huffman coding is a procedure to generate a binary code tree . The algorithm
invented by David Huffman in 1952.
Use bottom-up approach
It is effective data compression by reducing the amount of redundancy in the
coding of symbols.
INPUT: Symbols and corresponding probabilities
OUTPUT :Prefix-free codes with minimum expected lengths
For example , we have a text file that uses only five characters (A, B, C, D, E).
Encoding Decoding
Lempel Ziv Encoding
In this step, each block of 64 pixels goes through a transformation called the discrete
cosine transform (DCT). The transformation changes the 64 values so that the relative
relationships between pixels are kept but the redundancies are revealed. The formula is
given in Appendix G. P(x, y) defines one value in the block, while T(m, n) defines the
value in the transformed block.
Quantization
After the 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 and then
drops the fraction. This reduces the required number of bits even more. In most
implementations, a quantizing table (8 by 8) defines how to quantize each value. The
divisor depends on the position of the value in the T table. This is done to optimize the
number of bits and the number of 0s for each particular application.
Compression
After quantization the values are read from the table, and
redundant 0s are removed. However, to cluster the 0s together,
the process reads the table diagonally in a zigzag fashion
rather than row by row or column by column. The reason is
that if the picture does not have fine changes, the bottom right
corner of the T table is all 0s.
The Moving Picture Experts Group (MPEG) method is used to compress video. In
principle, a motion picture is a rapid sequence of a set of frames in which each frame is a
picture. In other words, a frame is a spatial combination of pixels, and a video is a
temporal combination of frames that are sent one after another. Compressing video, then,
means spatially compressing each frame and temporally compressing a set of frames.
Spatial Compression
The spatial compression of each frame is done with JPEG, or a modification of it. Each
frame is a picture that can be independently compressed.
Temporal Compression
In temporal compression, redundant frames are removed. When we watch television, for
example, we receive 30 frames per second. However, most of the consecutive frames are
almost the same. 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.
Audio Compression
Audio compression can be used for speech or music. For speech we need to compress a
64 kHz digitized signal, while for music we need to compress a 1.411 MHz signal.
Two categories of techniques are used for audio compression: predictive encoding and
perceptual encoding.
Predictive Encoding
In predictive encoding, the differences between samples are encoded instead of
encoding all the sampled values. This type of compression is normally used for speech.
Several standards have been defined such as GSM (13 kbps), G.729 (8 kbps), and
G.723.3 (6.4 or 5.3 kbps). Detailed discussions of these techniques are beyond the
scope of this book.
Perceptual Encoding
The most common compression technique used to create CD-quality audio is based on
the perceptual encoding technique. This type of audio needs at least 1.411 Mbps, which
cannot be sent over the Internet without compression. MP3 (MPEG audio layer 3) uses
this technique.
Conclusion
LZW has given new dimension for the development of new compression
techniques.
It has been implemented in well known compression format like Acrobat PDF and
many other types of compression packages .