“Data Compression is the method of reducing the {quantity|the number|amount} of data needed to represent a given quantity of information.”
It contains data that either provide no relevant information or simply which is already known then it is said to contain data redundancy. Data compression is achieved when redundancies are reduced or eliminated.
Objectives
To reduce the volume of data to be transmitted (text,images).
Reduce storage space required.
Reduce length of data transmission time over the network.
Categories of Data Compression
Lossless Compression
If the compressed data is reconstructed and also the original data is acquired with none loss of information then this system is named lossless compression.
Popular algorithms: LZW(Lempel-Ziv-Welch), RLE(Run Length Encoding), Huffman coding, Arithmetic Coding, Delta Encoding.
Lossy Compression
If the compressed data is reconstructed and also the approximation of original data is acquired and loss of data occur then this system is termed as lossy compression.
The original message will never be recovered specifically because it was before it had been compressed.
Applications
- Data Compression can be used in every where.
- Image Compression (JPG Images)
- Audio Compression (MP3’s Audio)
- Video Compression (DVD’s)
- General Data Compression (Zip File)
Lossless Data
- Huffman encoding
- Run Length Encoding
- Lempel-Ziv-Welch Encoding
Huffman Encoding
ASCII encoding is the example of fix length encoding, where each character is representing the same number of bits.
Variable length encodings used to reduce the number of bits, where different length for different character.
Run Length Encoding
- Repeated incidence of same character is termed a run.
- Number of repetition is called the length of the run.
- It is known as run-length as a result of a run is created for perennial bits and coded in lesser bits by solely stating what number bits were there
Example
- A file with 0 as repeating character
- Two characters within the compressed file replace every run of zeros
- For the primary three continuance 0’s in original file, the primary encoded stream
- In compressed file is showing that ’0’ was continuance ’3’ times.
You May also like…