Nepedia
Back to Discover
Advanced Reader
💻

Data compression

technology Maturity 9-11 war conflict Next article →

This article covers sensitive topics: war_conflict. Parents can manage visibility in Parental Controls.

Data compression is the process of encoding information using fewer bits than its original representation. In the digital world, this is often called source coding or bit-rate reduction. This process is vital because it makes data files smaller. Smaller files allow for more efficient storage on devices. They also enable much faster data transmission across networks.

Comparison of JPEG and PNG
Comparison of JPEG and PNG

Compression is categorized into two primary types: lossless and lossy. The choice between them depends on whether the user requires the exact original data or can accept a slightly altered version to save more space.

Lossless compression works by identifying and eliminating statistical redundancy. This means the algorithm finds patterns or repetitions within the data. Because it only removes redundant information, the process is entirely reversible. No information is lost during encoding, so a decoder can reconstruct the original file perfectly.

Nubio Diff Screenshot3
Nubio Diff Screenshot3

A simple example is run-length encoding. Instead of recording "red pixel, red pixel, red pixel," the system records "3 red pixels." This method is highly effective for data that contains many repeating sequences.

Several advanced algorithms drive lossless compression. The Lempel–Ziv (LZ) methods are among the most popular for storage. One variation, called DEFLATE, is optimized for both compression ratio and decompression speed. In the mid-1980s, the Lempel–Ziv–Welch (LZW) algorithm became a standard for many systems. LZW uses a table-based model where repeated strings of data are replaced by table entries. This method is used in GIF images and hardware like modems. Other methods include grammar-based codes like Sequitur and Re-Pair, which are effective for highly repetitive data.

Hybrid video encoder processing stages
Hybrid video encoder processing stages

Lossy compression takes a different approach by removing unnecessary or less important information. This method accepts a certain amount of data loss to achieve much higher compression ratios. Designers base these schemes on how humans perceive sensory input. For example, the human eye is more sensitive to changes in luminance, or brightness, than to changes in color. Lossy image compression, such as the JPEG standard, works by rounding off these nonessential bits. Similarly, lossy audio compression uses psychoacoustics to remove sounds that are difficult for humans to hear.

Most lossy compression relies on transform coding, specifically the discrete cosine transform (DCT). This mathematical process was first proposed by Nasir Ahmed in 1972. He later developed a working algorithm with T. Natarajan and K. R. Rao in 1973. The DCT is now a cornerstone of modern multimedia. It is used in JPEG and HEIF image formats, as well as MPEG, AVC, and HEVC video formats. It is also essential for audio formats like MP3, AAC, and Vorbis.

AudiodatenkompressionManowarThePowerOfThySword
AudiodatenkompressionManowarThePowerOfThySword

The theoretical foundations of this field were established by Claude Shannon. In the late 1940s and early 1950s, Shannon published fundamental papers that created information theory. His work provided the basis for understanding how information can be encoded. Other related mathematical areas include algorithmic information theory for lossless methods and rate–distortion theory for lossy methods. These theories help engineers understand the mathematical limits of how much data can be compressed.

Modern technology has even linked compression to machine learning. An optimal compressor can actually be used for prediction by finding the symbol that compresses best. This connection has led some to use compression as a benchmark for general intelligence. In unsupervised machine learning, the k-means clustering algorithm can compress data by grouping similar points into clusters. This reduces large datasets into a smaller set of representative points. Even large language models (LLMs) show compression abilities. DeepMind's Chinchilla 70B model successfully compressed images to 43.4% and audio to 16.4% of their original sizes.

Placa-audioPC-925
Placa-audioPC-925
597 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (5)
File:Comparison of JPEG and PNG.png
Comparison of JPEG and PNG.png
File:Nubio Diff Screenshot3.png
Nubio Diff Screenshot3.png
File:AudiodatenkompressionManowarThePowerOfThySword.jpg
AudiodatenkompressionManowarThePowerOfThySword.jpg
File:Placa-audioPC-925.jpg
Placa-audioPC-925.jpg
File:Hybrid video encoder processing stages.svg
Hybrid video encoder processing stages.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.