Computer Software

What's the difference between lossless and lossy compression?
Answered by HowStuffWorks
  • HowStuffWorks


  1. File compression software looks for redundancies in a computer file's code, and eliminates those redundancies in order to reduce the size of the file. Most computer files have a lot of the same information listed over and over again, just like a sentence reuses many of the same letters and words -- such as vowels or "the" and "and" -- to express a complete thought. Compression software uses mathematical algorithms to catalog repeated pieces of information in a file, and then refers back to that information whenever it's needed. The result is a smaller file. Imagine needing to use "and" only once in a paragraph that has eight separate "ands" and you begin to get the idea.

    All kinds of files can be compressed: Audio files, video files and still images each can be made smaller using a variety of algorithms. There are, broadly, two forms of compression: lossless and lossy.

    Lossless compression recreates a compressed file as an identical match to its original form. All lossless compression uses techniques to break up a file into smaller segments, for storage or transmission, that get reassembled later. Lossless compression is used for files, such as applications, that need to be reproduced exactly like the original file. Lossy compression, on the other hand, eliminates repeated or "unnecessary" pieces of data, as we discussed above. When such a file is decompressed, you get the compression software's re-interpretation of the original file.

    Lossy compression can't be used to compress anything that needs to be reproduced exactly -- it can't just toss out redundant pieces and hope to program will still work. Instead, lossy compression will more often be used with data that is open to some level of human interpretation, such as an image, where the results can be "fudged" the tiniest bit so that files can get smaller without, in theory, anyone noticing. The digital cameras we use today, for example, offer varying levels of compression -- in effect reworking the data of an image, throwing out whatever it can to reduce the image size while still retaining the snazzy picture you thought you took.

    More answers from HowStuffWorks »

Still Curious?
  • Is Kazaa legal?

    Answered by HowStuffWorks

  • What was the first graphical user interface?

    Answered by Curiosity

  • Why are there so many image formats?

    Answered by Science Channel


What are you curious about?

Image Gallery