c - 如何使用 zlib 制作 .zip 文件

标签 c zip zlib

我正在阅读 zlib 的文档,它相当详细。但我读到这一行:

The output data will be in the zlib format, which is different from the gzip or zip formats
http://www.zlib.net/zlib_how.html



似乎 zlib 创建了 zlib 格式与 不同 zip 此 SO 中讨论的格式:

How are zlib, gzip and zip related? What do they have in common and how are they different?

任何人都知道是否可以使用 zlib 创建 zip 格式?如何?

最佳答案

正如@Jongware 提到的,您可以在 contrib/minizip 中找到一个示例。源代码库的文件夹。

或者 !

您可以简单地使用 libzip .

可能重复:Simple way to unzip a .zip file using zlib

关于c - 如何使用 zlib 制作 .zip 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33506713/

相关文章:

c - 懂Objective-C的C难学吗

c - float 仅显示零 (C)

Java ByteArrayOutputStream 到不同的容器中

python - 使用 python zipfile 归档符号链接(symbolic link)

makefile - 找不到 CMAKE_C_COMPILER

C++ 和 zlib,帮助压缩字符串

c - 使用 zLib 时错误放气和膨胀

c - 从 fgets() 输入中删除尾随换行符

c - 使用4kb分配池有什么好处?

压缩对象上的 python map()