Data compression


Free Download Mp4Gain
picture

Data compression

Data compression
Data compression

The process of encoding information using fewer bits than the original representation

Data compression
Data compression

In computer science and information theory, data compression or source coding is the process of representing information with fewer data bits (or other information-related units) than if it were not encoded, according to an encoding mechanism specific . For example, if we encode “compression” as “comp”, the item can be represented with fewer data bits. A common example is the ZIP archive format, which not only provides compression but also acts as an archiver, capable of storing many files in the same archive.

We can use data consistency (represented by information entropy, entropy), regularity, and predictability to achieve data compression. The compression technology first developed by humans is actually natural language. Generally speaking, if a thing can be described in a relatively simplified natural language, then it will be better able to compress such things. The more consistent the data, the more concentrated its statistical features. Take image compression as an example, which centrally accounts for the time domain and frequency domain of the Fourier transform, the histogram, and the eigenvalues.

 

Data compression is possible because most real-world data has statistical redundancy. For example, the letter “e” is more commonly used in English than the letter “z”, and it is very unlikely that the letter “q” will be followed by a “z”. Non-destructive data compression generally exploits statistical redundancy so that the sender’s data can be represented more succinctly, but fully.

The compression ratio of non-destructive data compression is not sufficient to handle the large volume of audio and video data, but if some loss of fidelity is allowed, higher compression can be achieved. For example, when people look at photographs or television images, they may not realize that some details are not perfect. Similarly, two audio recording sample streams may sound the same, but they are not actually exactly the same. Destructive data compression uses fewer bits to represent images, video, or audio with acceptable or imperceptible numbers.

However, there are often files that cannot be compressed using destructive data compression, and in fact cannot be compressed using any compression algorithm for data that does not contain discernible patterns. Also, trying to compress already compressed data often results in data bloat.

In fact, destructive data compression will eventually get to the point where it won’t work. For example, an extreme example: the compression algorithm deletes the last byte of the file every time, and after this algorithm continues to compress until the file is empty, the compression algorithm will not continue to work.

Compression is important because it helps reduce the consumption of expensive resources such as hard drive space and connection bandwidth, however, compression requires information processing resources, which can also be expensive. Therefore, the design of the data compression mechanism requires a compromise between the compression capacity, the degree of distortion, the computing resources required, and various other factors that must be taken into account.

As with any form of communication, compressed data communication only works if both the sender and receiver of the information understand the encryption mechanism. For example, the article only makes sense if the recipient knows that the article is to be interpreted in Chinese characters. Also, the compressed data can only be understood by the receiver if he knows the encoding method.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Audio and video data compression

Audio and video data compression

Audio and video data compression

In computer science and information theory, data compression or source coding is the process of representing information with fewer data bits (or other information-related units) than if it were not encoded, according to an encoding mechanism specific .

Audio and video data compression

For example, if we encode “compression” as “comp”, the item can be represented with fewer data bits. A common example is the ZIP archive format, which not only provides compression but also acts as an archiver, capable of storing many files in the same archive.

We can use data consistency (represented by information entropy, entropy), regularity, and predictability to achieve data compression. The compression technology first developed by humans is actually natural language. Generally speaking, if a thing can be described in a relatively simplified natural language, then it will be better able to compress such things.

The more consistent the data, the more concentrated its statistical features. Taking image compression as an example, it centrally represents the time domain and frequency domain of the Fourier transform, the histogram, and the eigenvalues.

Data compression is possible because most real-world data has statistical redundancy. For example, the letter “e” is more commonly used in English than the letter “z”, and it is very unlikely that the letter “q” will be followed by a “z”. Non-destructive data compression generally exploits statistical redundancy so that the sender’s data can be represented more succinctly, but fully.

The compression ratio of non-destructive data compression is not sufficient to handle large volumes of audio and video data, but higher compression can be achieved if some loss of fidelity is tolerated. For example, when people look at photographs or television images, they may not realize that some details are not perfect. Similarly, two audio recording sample streams may sound the same, but they are not actually exactly the same. Destructive data compression uses fewer bits to represent images, video, or audio with acceptable or imperceptible numbers.

However, there are often files that cannot be compressed using destructive data compression, and in fact cannot be compressed using any compression algorithm for data that does not contain discernible patterns. Also, trying to compress already compressed data often results in data bloat.

Lossy Audio File Types: How It Is Different From Lossless

Lossy Audio File Types: How It Is Different From Lossless

Lossy Compression vs Lossless Compression

Lossy is a word used in digital audio to describe the type of compression used to store audio data. The algorithm used in the lossy audio format compresses the audio data in such a way that it discards certain information. This loss of signal means that the encoded sound is not identical to the original.

lossy vs lossless

Lossy audio produces lower quality audio and has a smaller file size.

Lossy compression is also called irreversible compression because data that has been deleted is impossible to recover.

What is the difference between Lossy and Lossless?
When you create MP3 files by ripping one of your music CDs, some details of the original recording are lost, making it a lossy format. This type of compression isn’t just limited to audio; for example, JPEG image files are also lossy compressed.

Sheets of colored paper compressed into a ball

This method is the opposite of lossless audio compression used for formats like FLAC, ALAC, and others. In this case, the audio is compressed in such a way that the data is not deleted. The sound is identical to the original source.

Lossy archives take priority when it comes to compatibility. While lossless files are only supported by some devices and apps, a lossy audio format like MP3 will work on almost any device.

How Lossy Audio Compression Works
Lossy compression makes certain assumptions about frequencies that the human ear is unlikely to detect.

When a song is converted to a lossy audio format such as AAC, the algorithm analyzes all frequencies and then discards the frequencies that the ear should not be able to detect. These low frequencies are filtered or converted into mono signals that take up less disk space.

Another technique eliminates very quiet sounds that the listener is unlikely to notice, especially in the loudest part of the song. This approach reduces the size of the audio file while maintaining the highest possible audio quality.

What happens to the audio when it is compressed?
Lossy compression introduces artifacts. These artifacts are unwanted sounds that are not in the original recording but are a by-product of compression. This noise degrades sound quality and is noticeable when music files are converted using low bit rates.

Various types of artifacts affect the quality of the recording. Distortion is one of the most common artifacts. For example, distortion makes the drums feel weak, without any real beat. Song voices can also be affected, resulting in harsh vocals and lack of detail.

In many cases, casual listeners can’t tell the difference between lossy and lossless encoding, although some audiophiles using very expensive equipment claim to hear the difference. The difference in quality is only noticeable when very low data rates or aggressive compression algorithms come into play.

Why compress audio files?
Most digital audio formats use some form of compression to efficiently store sound. Without compression, the file sizes would be very large.

For example, a typical 3-minute song stored as an MP3 file is between 4MB and 5MB. Using the WAV format to store the same song, but without compression, results in a file size of approximately 30MB, at least six times that size. Fewer songs fit on your smartphone or hard drive when you choose uncompressed audio formats

Uncompressed and compressed formats

Popular audio formats

Uncompressed formats

There are audio formats that do not have compression and are the best in terms of sound quality. On the other hand, they take up much more memory space and a lower transmission speed than compressed formats. With professional software such as Pro Tools, SuperCollider or Max, you generally work with files of this type. The two main formats are:

WAV (wave). Audio format developed by Microsoft and IBM for compatible IBM PCs. In this format, musical instruments feel the same regardless of the PC on which the file is played (with the same acoustic quality of the hardware components, of course).

AIFF (Audio Interchange File Format). The format developed by Apple is also called the Apple Interchange File Format.

Audio formats

Lossy compression

It allows for more compression, but at the expense of sound quality. Lossy compression methods generally tend to discard information considered useless, keeping only the essential ones and arise from the idea that not all frequencies contained in a sound spectrum are perceived by the human ear. Then the high frequencies are cut off, which are believed to be the least distinct in our hearing. Obviously, the more frequencies you cut, the more the space occupied by the audio track decreases and with this also the quality of the result as a reconversion process. It does not allow the complete restoration of the cut-off frequencies. Let’s see what are the main audio formats of this type:

MP3 (MPEG-1/2 Audio Layer 3). Audio compression algorithm capable of drastically reducing the amount of data required to reproduce a sound, compromising obtaining an almost faithful reproduction of the original uncompressed file. The best codec for compression is Lame. maximum achievable bit rate 320 Kbps.

WMA (Windows Media Audio). Audio file standard invented by Microsoft. Audio compression format very similar to an MP3.

OGG (Vorbis). It is an open source algorithm and with the same perceived quality, it allows greater compression than the MP3 format, obtained through advanced psychoacoustic research.

AAC (advanced audio coding). It is an audio compression format officially included in MPEG-4. Provides superior audio quality to MP3 format with more compact encoding. Currently it is used mainly by Apple, which in the variant that manages copyright has a compression of 128 Kbps (the standard of the iTunes Store) and corresponds to that of an MP3 at 192 Kbps at constant bitrate. Conversion times are a bit slower than other formats.

AC3 (Dolby Digital). Dolby Digital is a multi-channel audio coding system developed by Dolby Laboratories Inc and used in film, digital TV, laser discs, DVDs, and other digital audio streaming or playback media. It works from a minimum of 96 kbps to a maximum of 640 kbps. In cinema, Dolby Digital is used with only 320 kbps of bandwidth, as it prints in the limited space available between the slide holes of the films. Generally, in DVD it is used with a bit rate of 192 kbps to encode stereo signals (2.0, 2.1) or stereo surrounds, and with a bit rate between 384 and 448 kbps for 5.1 signals.

Lossless compression

These compression methods try to reduce the space occupied by the track without going to touch the sound. The compression rate is much lower than with lossy methods, but there is no loss of quality and the sound is identical to the original when converting. Let’s see what are the main audio formats of this type:

FLAC (Free Lossless Audio Codec). The widespread open source audio codec is currently well supported by various audio software. Unlike most lossless compression algorithms (like ZIP and gzip, for example) that only achieve 10-20% compression, it achieves significant compressions, on the order of 30-50%.

APE (Monkey’s Audio). No lossy format that allows us to reduce the space our music occupies by approximately 50% (in some cases even more). Currently it is no longer developed.

ALAC (AApple Lossless Audio Codec). The format developed by Apple stores data in an MPEG-4 container with the extension .m4a. It does not have Digital Rights Management (DRM) and is now deprecated.