
Audio formats
Compression
Compressions are systems for reducing the file size by using different types of algorithms and / or encodings.
There are two types of compression: lossless (compression), which compresses the file without deleting information. Decompression can therefore exactly return the original and lossy (lossy) compression, eliminating redundant parts that are considered irrelevant or irrelevant and the decompression does not return to the original.
It is clear that the first system preserves the integrity of the original, but less compressed, while the second implies a loss of quality, but compresses much more, in proportion to the degree of loss one is willing to accept. Let’s look at a few examples.
Lossless compression
Lossless compression is based on reducing the redundancy typical of human production.

For example, in a book dedicated to experimental music, the phrase “experimental music” is repeated many times with 19 characters. At this point, simply replace it with a symbol that is normally not included in the text, e.g. ‘# 1 #’ to reduce a term from 19 characters to one of 3 and store 16 characters for each occurrence. Actually we have to say “for every occurrence after the first”, because in order to unpack the text, we also have to create an index of the substitutions in which it is written in this case
# 1 # = “experimental music”.
Obviously, many other words or phrases are repeated several times in the book, and each of them can be replaced by a symbol such as # 2 #, # 3 #, …, # n #, where n is a progressive number, which ultimately makes significant savings.
The Lempel-Ziv (LZ) algorithm uses a similar system, the derivatives of which underlie many modern lossless compression programs, including the well-known ZIP.
In fact, the ancestor of many lossless encoders is the so-called Huffman coding. It is a redundancy elimination system that was developed in 1952 by the researcher of the same name, then an MIT student. His algorithm solves the problem of encoding a series of strings (string = any character set) as compactly as possible, taking into account the frequency with which strings occur: the most common is assigned the shortest symbol in to maximize compression. Here is a good example dealing with Huffman coding issues.
Another type of lossless compression, which is always based on reducing redundancy, is the so-called Run Length Encoding (RLE), which works in a very simple way. Suppose we have the following string of 20 characters
ABBBBBBBBBCDEEEEFGGG
By applying the RLE it will
A 9BCD * * * 4EF 3G
for a total of 13 characters with a saving of 35%.
In practice, a code consisting of the character and the number of repetitions was inserted instead of the repeated characters. The asterisk indicates that the following is the number of repetitions and is not part of the chain (this is of course the basic principle; the details of the coding may vary).
Of course, this system is not productive with text, but it is the case with images where long stripes of the same color are fairly common.
Lossy compression
Lossy compression is based on the elimination of the information components that are considered to be more or less irrelevant depending on the compression level required. At low compression levels, only the really irrelevant details are removed, while at higher levels, the sensitive details are also removed.
An example that is not audio is the encoding of JPEG images, in which nuances are eliminated by assigning neighboring pixel groups the same color if their difference is less than a value that is proportional to the degree of compression. On this page you can see the effect of the size reduction and the corresponding loss of quality when increasing the compression levels.
Further information on compression on Wikipedia (free, community-created encyclopedia) can be found here in English. Wikipedia also exists in Italian, but the content is smaller.
First class compressed audio formats
Lossless (lossless)
These formats work similarly to zip. You compress the content without removing anything. At the time of listening, it is necessary to perform a decompression and to return to the original in one of the linear formats already shown.
Since it is lossless compression, the comparison between these codecs is not made in




