Computer Science – 1.3 Compression | e-Consult
1.3 Compression (1 questions)
Lossless compression reduces file size without losing any of the original data. The original data can be perfectly reconstructed from the compressed file. A common example is ZIP compression, which is often used for archiving files. Other examples include Run-Length Encoding (RLE) and Huffman coding. Lossless compression typically achieves lower compression ratios compared to lossy methods because it must preserve all the original information.
Lossy compression achieves higher compression ratios by discarding some of the original data. This discarded data is deemed less important, often based on perceptual models (e.g., removing high-frequency components in images that are less likely to be noticed). Examples include JPEG for images and MP3 for audio. The trade-off is that the decompressed data is not an exact replica of the original; some information is lost. The level of lossiness is often adjustable, allowing users to balance file size and quality. Higher compression levels result in smaller files but greater data loss.