1

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)?

Mylas
  • 11
  • 1
  • No, you can't compress something that's already been compressed. If you could all compression software would recursively call itself until the file was 1kb – Adam H Sep 19 '18 at 21:29
  • 2
    Actually I have developed a recursive compression algorithm that can go all the way down to a single bit... just I'm having serious difficulties with the decompression algorithm ;-) – Mark Setchell Sep 19 '18 at 21:56
  • Give it a try! Try zipping a file twice. Consider what happened... and why. – Ray Sep 21 '18 at 14:49

1 Answers1

1

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.

Mark Adler
  • 101,978
  • 13
  • 118
  • 158