从 zip 档案中读取的 C 库
是否有可移植的 C 库来访问 .zip 档案? “gzip”或“zlib”(我能找到的最接近的)仅处理压缩数据,我需要能够列出存档内的文件,并单独访问每个文件,如果它们是使用“deflate”方法压缩的,我可以在上面使用 zlib 。
Is there a portable C library to access .zip archives? "gzip" or "zlib" (the closest I could find) only handle compressed data, I need to be able to list the files inside the archive, and access each one individually, and if they're compressed using the 'deflate' method, I can use zlib on it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
也许是迷你压缩包?
http://www.winimage.com/zLibDll/minizip.html
Minizip, maybe?
http://www.winimage.com/zLibDll/minizip.html
Linux 和 BSD 附带的 zip 实际上称为 info-ZIP,位于此处。就我个人而言,我还没有尝试过这样的事情,但 info-zip 的首页指出“Info-ZIP 的主要压缩引擎也已被剥离到免费的 zlib 压缩库中”,因此您可能想查看一下 zlib。 zlib 页面有一个常见问题解答,其中包含您的具体问题的答案。我将从研究 info-zip 的工作原理开始。祝你好运。
The zip that comes with Linux and BSD is actually called info-ZIP which is here. Personally I have not tried such a thing but the info-zip front page states "Info-ZIP's primary compression engine has also been spun off into the free zlib compression library", so you might want to check out zlib. The zlib page has a FAQ with a answer to your specific question. I would start by studying how info-zip works. Good luck.
7-zip 拥有完整的 SDK、示例源代码和大量功能。
看看这里
7-zip has a complete SDK, with example sources, and a lot of functionality.
take a look here