How many times can a file be compressed?

2019-01-08 10:05发布

I was thinking about compression, and it seems like there would have to be some sort of limit to the compression that could be applied to it, otherwise it'd be a single byte.

So my question is, how many times can I compress a file before:

  • It does not get any smaller?
  • The file becomes corrupt?

Are these two points the same or different?

Where does the point of diminishing returns appear?

How can these points be found?

I'm not talking about any specific algorithm or particular file, just in general.

14条回答
对你真心纯属浪费
2楼-- · 2019-01-08 10:37

You can compress a file as many times as you like. But for most compression algorithms the resulting compression from the second time on will be negligible.

查看更多
狗以群分
3楼-- · 2019-01-08 10:37

You can compress infinite times. However, the second and further compressions usually will only produce a file larger than the previous one. So there is no point in compressing more than once.

查看更多
登录 后发表回答