What is the practical value of redundancy in zip files?

9

1

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.

mafu

Posted 2011-05-13T10:49:30.917

Reputation: 2 565

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 – 2011-05-13T11:05:10.930

Answers

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.

Blomkvist

Posted 2011-05-13T10:49:30.917

Reputation: 2 379

2I 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 – 2011-05-17T09:02:24.193

2Good answer to a different question :/ – endolith – 2013-03-14T18:30:52.150