Differences between lossy and lossless compression: advantages and disadvantages


Free Download Mp4Gain
picture

Audio compression reduces the size of an audio file.

Difference Between Lossy Compression and Lossless Compression ...

The physical structure of a CD and data storage are described in the Red Book, written by Sony and Philips in 1980, the year the CD sales began.
The standard capacity for an audio CD is 747 MB, however, the tracks stored on the CD are in .CDA format (they weigh a few bytes because they do not actually contain the track itself, but only references on the duration of the actual audio track containing encoding digital audio file).
A codec is a program that digitally encodes and decodes a signal (usually audio or video) so that it can be stored on a storage medium or retrieved for reading.

Lossless Compression
Codecs also perform compression (and decompression on reading) of the data related to them, in order to reduce the storage space occupied for the benefit of audio / video usability.
To achieve compression, the reduction of the frequencies to be reproduced (in some audio codecs, the frequencies that are not audible to the human ear) or the elimination of redundancies is used.

Firstly, compression, in addition to reducing space for file storage, also obviously increases transfer speed.
The shortcomings of systems of this type are a greater difficulty in reading / writing files and, in general, a decrease in the quality of the audio.

BITRATES

With respect to audio formats, each second is associated with a certain content of information and, therefore, with a certain subsequence of binary digits.
The number of binary digits that make up these subsequences is called the bit rate (binary digits used to store one second of information).
This can be constant throughout the life of the file or vary within it.
The bit rate is expressed in kilobits per second (kbps) and varies from 32 kbps (the minimum) to 320 kbps (the maximum).
Compression, by decreasing the total length of the file, will consequently decrease the average length of the subsequences, that is, it will decrease the average bit rate.
Therefore, the average bit rate in these cases becomes the index of the compression extent.
For example, if the source file had a 256Kbps bitrate and the compressed file had an average 128Kbps bitrate, then we would have reduced it by a factor of 2.
CBR (constant bit rate) The bit rate remains constant in each frame and this means that the encoder will always use the same number of bits to encode each musical passage.

In practice, the more complex passages will have a lower quality than the simple ones, since they will be encoded with an always equal number of bits, while more would be needed for complex passages and less for simple passages.
ABR (Average Bit Rate) is a mode that has a higher throughput than CBR and consists of a kind of “variable” bit rate.
The encoder will encode the regions that need it with more bits and the simplest ones with less, trying to keep the average bit rate set throughout the file.
Finally, VBR (Variable BitRate) is a mode where there is a truly variable bit rate.
By setting a quality index and a maximum and minimum bit rate, the encoder will encode each frame using the most appropriate bit rate (the bit rate increases / decreases according to the “complexity” of the music).

COMPRESSION TYPES

There are basically two types of compression: lossless and lossy algorithms.
As the name implies, lossless compression retains the original data so you can get an exact copy of it, while lossy compression causes some changes to the original data.
Lossy compression compromises the loss of information and the size of the final file, while a lossless compression must balance the size of the final file with the execution times of the algorithm.

LOSSLESS COMPRESSION

Lossless compression indicates an algorithm that completely preserves, through the various stages of compression / decompression, all the original information in the source file.
The most famous algorithms that use “lossless” techniques are the Huffman encoding and the LZW (Lempel-Ziv-Welch) algorithm used in the compression of GIF files.
The efficiency of these algorithms generally ranges around the compression ratios of the order of 70% maximum, that is, the compressed data will occupy 30% of the original length.

In conclusion, we can say that lossless compression is commonly used for data compression, such as executable applications, text or databases, which must be restored to their original state.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Author: R. Arias

R. Arias is the author of this article and has extensive experience for more than 30 years as a recording engineer and audio specialist, as well as more than 20 years of experience creating algorithms related to audio and video. Linkedin