Recompressing Compressed Files

195 views Asked by At

Can you keep sending the output of BZip2 (or any compression software) back through the compression process over and over again to make the output files smaller and smaller? Can you compress a file using one software (BZip2) that was already compressed using another method (Snappy)?

1

There are 1 answers

0
Mark Adler On

No and no. (For lossless compression.)

If the original file was extremely redundant, like megabytes of nothing but zeros, then the first, and maybe the second recompression will result in compression. But at some point there will be no gain from recompression, and instead a small increase in file size. For normal files, the first recompression will result in no gain.

This is true regardless of how you might mix lossless compressors.