Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

1it
2is
3what

And then I would rewrite the sentence as

12312becausethats312 

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

312x
12y

So that it becomes

yxbecausethatsx

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
1  
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. –  mafutrct May 17 '11 at 9:02
    
Good answer to a different question :/ –  endolith Mar 14 '13 at 18:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.