We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Software

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What is a Compression Algorithm?

Mary Elizabeth
By
Updated: May 16, 2024
Views: 11,691
Share

Computer files can take up a large amount of space on a hard drive as well as a lot of bandwidth to transmit. To save space, especially with files that are not often accessed, and bandwidth for files being transmitted, storage methods have been developed to save the data in a smaller package by compressing it in some way. In each case, a compression algorithm — a method for reducing the data size — is used. There are several popular categories and types of compression algorithm, each of which works in a different manner, and some of which have results that differ in important ways. Using various compression algorithms, it is generally possible to reduce a text file to less than half its original size; for graphics files, the results vary widely. The file that results from compression may either be a different format or an archive file, which is often used for storage, transmission, and distribution.

One way to categorize compression algorithms is by whether they use dictionary or statistical methods to compress data. The dictionary method focuses on repeatable phrases and is used in GIF images and in JAR and ZIP archives. The statistical method relies on frequency of use to make a conversion, which is done in two passes. An example is Modified Huffman (mh), used in some fax machines.

A second way to categorize compression algorithms, and the one that non-professional programmers most often encounter is by whether they are lossless or lossy. A lossless data compression algorithm is one the compresses the data in such a way that when it is decompressed, it is exactly identical to the original file. One example of a lossless data compression algorithm is lzw (Lempel-Ziv-Welch algorithm). Developed in 1977 by Lempel and Ziv and improved in 1984 by Welch, it is used in files such as GIF, TIF, and PDF, as well as certain modems.

A lossy data compression algorithm has the capacity for reducing data to a smaller size than lossless compression, but at the cost of some of the original data. In other words, the restoration following lossy data compression does not give an identical copy of the original file. The compression algorithm is, however, designed to limit the losses so that they are not apparent to the ear or eye. Lossy compression is used in file formats such as AAC, JPEG, MPEG, and MP3.

Share
EasyTechJunkie is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Mary Elizabeth
By Mary Elizabeth
Passionate about reading, writing, and research, Mary Elizabeth is dedicated to correcting misinformation on the Internet. In addition to writing articles on art, literature, and music for EasyTechJunkie, Mary works as a teacher, composer, and author who has written books, study guides, and teaching materials. Mary has also created music composition content for Sibelius Software. She earned her B.A. from University of Chicago's writing program and an M.A. from the University of Vermont.
Discussion Comments
Mary Elizabeth
Mary Elizabeth
Passionate about reading, writing, and research, Mary Elizabeth is dedicated to correcting misinformation on the...
Learn more
Share
https://www.easytechjunkie.com/what-is-a-compression-algorithm.htm
Copy this link
EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.

EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.