Zip 文件只包含其本身?
只是出于好奇,是否存在一个有效的 zip 文件(根据格式规范),该文件只包含其自身?
换句话说,unzip
实现的函数有不动点吗?
我可以编写一个程序以智能(非详尽)的方式搜索这样的固定点吗?
我也考虑过相反的情况,即如果 zip 有一个固定点,但大概一个文件可以以不同的方式压缩(不同的算法,不同的压缩级别等等),因此f = zip(f)
是否适用于某些文件 f
可能取决于实现。然而,由于 zip 压缩是无损的,因此 unzip
的情况可能应该有一个“正式”答案。
有人探索过这个吗?任何指向相关 URL 的指针都值得赞赏。
Just out of curiosity, does there exist a valid zip-file (according to format spec) that, contains nothing but itself?
Put another way, does the function implemented by unzip
have a fix-point?
Can I write a program to search for such a fix-point in a intelligent (not-exhaustive) way?
I've thought about the opposite as well, i.e. if zip
has a fix-point, but presumably a file can be compressed in different ways (different algorithms, different levels of compression and so on), thus whether or not f = zip(f)
holds for some file f
is probably implementation dependent. Since the zip-compression is loss-less however, the case for unzip
should probably have a "formal" answer.
Has anyone explored this? Any pointers to related URLs are appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在这里阅读:http://research。 swtch.com/2010/03/zip-files-all-way-down.html
在这里您会找到 r.zip,其中包含其自身。
You can read about it here: http://research.swtch.com/2010/03/zip-files-all-way-down.html
Here you will find r.zip, which contains itself.