Data compression: lossless and lossy


Free Download Mp4Gain
picture

Data compression: lossless and lossy

In computer science and telecommunications, the term data compression (data compression) will indicate the data processing techniques that allow the reduction of the quantity of bits necessary for the representation of the information in digital form. In practice, for example, data compression makes it possible to reduce the number of bits required for the transmission of a video transmission, allowing it to be viewed on the Internet even in the presence of a connection that is not fast enough.

losseless compression

For files, data compression allows you to reduce the size (number of bits) of the file – this is advantageous because it reduces the space occupied by the file on disk and allows you to transfer the file more quickly (for example, by email).

Compression techniques fall into two main categories:

lossless compression (lossless):

in this case it is possible to rebuild the file from the compressed without loss of information;

lossy compression (loss)

compression occurs to the detriment of information quality, for example, through loss of image definition or sound quality of an audio file; in this case it is not possible to rebuild the file from the compressed file before compression.

how mp3 workslosseless compression

The two techniques are used in different areas. As already mentioned, lossy compression is often applied to images, sounds and videos as it enables significant reductions to be made from the original data, at the price of an often negligible loss in quality. In addition, lossy techniques can be applied during data transmission (runtime), that is, it is not necessary to know all the data to be compressed to apply them: this is obviously an advantage in the transmission of transmissions over the Internet . Among the best known lossless algorithms, we mention jpeg for images and mp3 for audio and mpeg for videos.

In contrast, lossless compression is used when you want to compress text documents, programs, databases, circuit diagrams, etc. and in any case where the loss of the original data is not accepted. The lossless compression category includes .zip and .rar formats, often used to compress files and file folders.

Later we will discuss lossy compression techniques, talking about multimedia formats. Here, instead, we want to deepen the understanding of lossless compression.

Lossless compression algorithms

Lossless compression techniques (algorithms) can be divided into two main categories:

statistical compression;

replacement compression

.
Statistical compression is based on the input study to be compressed. Statistical studies are carried out on the input format to obtain a good compression. For example, in a text file to compress, the relative frequency of each character is studied and then the shortest code is associated with the character present several times in the text; vice versa, characters present with low frequency are associated with a longer code. Codes like Huffman’s are part of this class, which we will discuss in the next lesson.

As for substitution compression, this is based on the idea of ​​replacing, in a file, all occurrences of repeated strings with pointers to previous copies of the same string. Compression is due to the fact that the length of a pointer is usually less than the length of the string being replaced. As a result, the higher the repetitions of string occurrences in the file to be compressed, the greater the degree of compression achieved.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

What is an audio compressor.

In the field of professional sound, a compressor is an electronic sound processor designed to reduce the dynamic range of the signal without noticing its presence too much. This task is done by reducing the system gain, when the signal exceeds a certain threshold.

Traditionally, compressors have been electronic equipment with one or two rack units, but software versions of them have appeared for some years.

A compressor acts in such a way that it attenuates the electrical signal by a certain amount (normally measured in decibels) and from a certain input level. The objective is to ensure that the resulting dynamic excursion is lower than the original, to protect certain equipment against possible signal peaks or, if it is a saturated sound, to try to hide the error.

Reasons to compress a signal

-Control the energy of the signal: The human ear is very sensitive, so the compression must be smooth and subtle so as not to capture it. This type of compression is used when there is a signal in which the intensity varies, so it is compressed to achieve a more constant signal within the values ​​assigned to it.

-Control the peak level of the signal: Often the equipment is limited, so the amplifiers can saturate and therefore be damaged. In this case the compression is used to control the signal and thus protect the equipment.

-Reduce the dynamic range of the signal: By attenuating the peaks of a signal, we reduce its dynamic range. Many devices are limited by the peaks, and this allows the RMS level of the signal to be raised.

Compressor Uses

In the field of music, its use ranges from applications for musical recordings to live sound. For example, it is often used to add more glued to the sound, an effect that is achieved by compressing the signal to subsequently apply a gain to the output of the device, which usually conceals possible interpretation failures by the artist, at least as Dynamic control refers. A compressor is highly recommended (and with certain musical styles, indispensable) for when using an electric bass. The slapping effect (hitting the strings with the finger) produces extremely high output peaks (20 dB or 10 times more than normal), which at low output levels generate distortion, and at high volumes (as in recitals) they can cause serious damage to the amplifier, and even the speaker (an excess of “excursion” can cause the speaker to tear from its suspension). Even in the (theoretical) case of a musical system with an infinite dynamic range, the difference, auditory speaking, using or not the compressor is imperceptible. Its use is also very frequent in voices, since not all singers use the appropriate technique so the signal level varies constantly.

-It is widely used in broadcasting, to improve the speaker’s diction.
-Compress during mastering improves the sound definition of the final mix.
-To protect the equipment (speakers).