Will the size of a file decrease forever if you keep zipping the file continuously?

The simple answer to the question is NO.

When you use an utility like WinZIP or WinRAR, you will find that the size of the file initially decreases but after a certain number of iterations, the size of the file will actually start to increase.

The reason is that compression utilities look for patterns and then add an index to the pattern that contains the location and the number of occurrences for the pattern.

After some iterations, there may not be any more patterns available but because we tried to compress the file, an index has to be added to the file and hence the size of the index increases.

As a result, compressing the file will actually increase the size of the zip file .

You may be interested in reading

Comments

No Comments

Leave a reply

Name *

Mail *

Website