29

我希望能够在多个版本的 Windows、Linux/Unix 和 MacOS 上从我的非 gui C/C++ 应用程序中压缩文件。

用户将使用 Eclipse + makefile 或 VisualStudio 使用此应用程序进行编译和运行。我不希望用户必须单独安装某些东西,或者让我的 makefile 安装可执行文件。

更喜欢开源。我已经在看“Zip 3.0”了……

4

8 回答 8

12

看看图书馆档案。我花了很多时间寻找一个跨平台和 LGPL 许可的、界面方便的库。这是我见过的最好的。非常简单而强大的工具。最初是为类 Unix 系统设计的,但也有 Windows 版本

于 2012-02-17T22:31:27.877 回答
8

我用 miniz 取得了很好的效果:https ://code.google.com/p/miniz/

对于 c++ 中字符串的简单压缩,我也非常喜欢Timo Bingmann 的解决方案

于 2014-02-18T00:34:01.343 回答
8

I'd recommend ZipLib https://bitbucket.org/wbenny/ziplib/wiki/Home

Personal reasons why I love this project:

  • built around c++11 stl streams (ex. decompresses into stl streams!)
  • lightweight (no dependencies other than zlib)
  • can be used on both windows & liunx

It took me a long time to find this project - hope this helps someone.

于 2014-06-04T13:14:08.753 回答
6

我们在这里使用了几次zlib 。这是一个相当标准的库,在大多数主要语言中都有实现。

于 2008-11-04T18:47:50.570 回答
4

这个怎么样:

http://zziplib.sourceforge.net/

于 2010-03-30T14:27:38.990 回答
1

http://www.info-zip.org/UnZip.html

高温高压

于 2008-11-05T13:02:42.687 回答
1

其他人提到了 zlib,它很好而且相当简单。

7 -Zip (LZMA) SDK更复杂,但也有很好的压缩率。

编辑:虽然仍在开发中,随着发布过程和历史的推移,我现在会犹豫是否推荐这个。

于 2009-01-04T03:43:35.077 回答
0

ZLIB - 世界上最便携的图书馆。开源,非常成熟和可靠。黄金标准。为什么要使用其他东西?

于 2009-01-04T03:28:16.450 回答