Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How is redundancy implemented in zipping, and how do I benefit from it?

I'd assume it consists of something like storing the lookup tables twice so a single defect does not invalidate the whole rest of the file. Regarding the use case, possibly when storing the file on a CD that gets a slight scratch?

However, I personally never got any profit from adding redundancy to zip files, and I tend to omit them, so I was wondering if they are actually useful in practice.

share|improve this question
CDs use their own sort of redundancy to compensate for scratches etc., it's called eight-to-fourteen modulation. I think the better use case would be downloads that get corrupted for whatever reasons. – slhck May 13 '11 at 11:05

I believe you're talking about the LZ adaptive algorithm. It's not referred to as redundancy because of anything that's getting duplicated in the process of building the zip file. The term comes from how this method of compression works.

To illustrate, here's an example. Let's say I had a document containing the phrase:

It is what it is because that's what it is

If I wanted to make this phrase shorter through redundancy, I would first make a dictionary containing all the words that were repeated, like so


And then I would rewrite the sentence as


If I then want to compress it farther I can add the following to my dictionary:


So that it becomes


As you can see, the more redundancy checks you go through the greater the compression. But you're also increasing the likely hood of corruption. This is because as the dictionary grows it becomes more prone to damage and if any portion of the dictionary gets damaged the rest can't be read.

share|improve this answer
I think this is not what I meant. I was talking about the option to add recovery information. This feature may not exist in the classic zip format though. – mafu May 17 '11 at 9:02
Good answer to a different question :/ – endolith Mar 14 '13 at 18:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .