Compression methods can be lossless or lossy. In lossless compression, the aim is to reduce the information content so that it can be reproduced exactly. In this method, only clearly redundant data sets are compressed without changing or removing any information. The reproduction corresponds one hundred percent to the original. Lossless compression is used, for example, in text compression, audio compression or image compression.
In lossless compression, data reduction is achieved by exploiting statistical frequencies. For example, when compressing text, short codes are assigned to the most frequently occurring letters, such as the "e", and long codes are assigned to rarely occurring letters, such as the "y". And in image compression, only the differences between two pixels are stored. With lossless compression, in contrast to lossy compression, only much lower compression rates are achieved.
One of the best-known methods of lossless compression is the ZIP file format, which compresses text and graphics of different file formats with an enormously high compression rate. Other well-known methods include the RAR file format (Roshal Archive), Huffman coding, the LZW algorithm, Run Length Encoding( RLE), Brotli compression, as a universal lossless compression algorithm and a mode in JPEG.
Lossless Predictive Audio Compression( LPAC) and Lossless Transform Audio Compression( LTAC) are two methods for audio compression that are considered in MPEG-4 as MPEG-4 Audio Lossless Coding( ALS). Other lossless compression methods include OptimFrog, Monkeys Audio( APE), Free Lossless Audio Codec( FLAC), and Apple Lossless Audio Codec( ALAC).