
Compress mp3 without losing quality

On lossless music compression, theory, practice, conclusions.
With this material, I want to open a series of articles with everything related to listening to music on a computer. The time has come to share experiences and summarize disparate articles on the Internet in one, although they are not intended to be precise, but relatively brief. In the first part, we will see the audio formats. What is FLAC, WavPack, TAK, Monkey’s Audio, OptimFROG, ALAC, WMA, Shorten, LA, TTA, LPAC, MPEG-4 ALS, MPEG-4 SLS, Real Lossless? Do you know how many types of audio files are registered today? So far, we are dealing with lossless compression formats for audio materials, and the answer to the question about the number of audio extensions is at the end of the article. Happy reading!
![]()
So first, let’s define the terms:
“An algorithm is a precise prescription that defines the computational process that goes from variable inputs to the desired result.”
“Codec (codec in English, of encoder / decoder – encoder / decoder – encoder / decoder or compressor / decompressor) is a device or program capable of converting data or signals. Codecs can encode a stream / signal (often for transmission, storage, or encryption) or decode, to view or change into a more suitable format for these operations. Codecs are often used in digital video and audio processing. Most codecs for audio and visual data use lossy compression to obtain an acceptable final (compressed) file size. There are also lossless codecs ”.
“Lossless data compress. – method of data compression, using encoded information that can be restored in one bit. This fully recovers the original data from the compressed state. As a rule, each type of digital information has its own lossless compression algorithms “.
Lossless data compression is used when the identity of the compressed data with the original is important. Common examples are executables, documents, and source code. Programs that use lossless compression formats are called archivers, everyone knows the most popular ZIP or RAR file formats, the Unix Gzip utility, etc. All these programs differ in the applied algorithms (one or more) and therefore in different compression properties of different files.
Part I. – THEORY:
Compression methods or lossless compression algorithms can be classified according to the type of data for which they were created. There are three main types of data: text, images, and sound. Basically any multipurpose lossless data compression algorithm (multipurpose means it can handle any type of binary data) can be used for any type of data, but most of them are inefficient for all basic types. Audio data, for example, cannot be compressed well with a text compression algorithm and vice versa.
Compression methods include the following: entropy compression, dictionary methods, statistical methods. Each method is good for a specific type of data and includes several algorithms.
Entropy compression: Huffman algorithm Adaptive Huffman algorithm Arithmetic coding (interval Shannon-Fano algorithm) Golomb codes Universal Delta code (Elias Fibonacci)
Dictionary methods: RLE Deflate LZ (LZ77 / LZ78 LZSS LZW LZWL LZO LZMA LZX LZRW LZJB LZT)
Statistical algorithm models for text (or textual binary data as executable) include: Burrows-Wheeler transform (block sort preprocessing that makes compression more efficient) LZ77 and LZ78 (used by DEFLATE) LZW.



