zlib 和 minizip 有什么关系?

What is the relationship between zlib and minizip?

zlib和minizip有什么关系?当我下载 zlib 时,我看到 minizip visual studio 项目是 windows 环境中 zlibvc 解决方案的一部分。

  1. 不确定这两个库是不同的还是一个是另一个的组件。
  2. 如果两个不同,每个的用例是什么

当我检查 zlib FAQ:

Q: I'm having a problem with the zip functions in zlib, can you help?

A: There are no zip functions in zlib. You are probably using minizip by Giles Vollant, which is found in the contrib directory of zlib. It is not part of zlib. In fact none of the stuff in contrib is part of zlib. The files in there are not supported by the zlib authors. You need to contact the authors of the respective contribution for help.

还有下一个:

Q: Can zlib handle .zip archives?

A: Not by itself, no. See the directory contrib/minizip in the zlib distribution.

所以从上面的问答我们可以推断出zlib使用minizip来处理.zip文件。

minizip 是一组使用 zlib 和处理使用 deflate 和存储压缩方法的 zip 格式文件的压缩和解压缩例程。 minizip 不是 zlib 的一部分,但作为 contrib 目录中的第三方贡献包含在 zlib 发行版中。

还有其他 zip 库(也使用 zlib),例如 libzip 和 libarchive。

从依赖的角度来看,minizip 使用 zlib 来支持 compressed archives。

创建 ZIP 文件时,涉及两个不同的步骤:

  • 归档:将多个文件打包成一个文件。 (最小压缩)
  • 压缩 (zLib)

一个不一定依赖另一个。 (例如,您可以只压缩一个文件而不存档,或者您可以创建一个非压缩存档。)