C++ 具有公共领域许可的最佳 zip 库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3220549/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 12:22:02  来源:igfitidea点击:

The best zip library with public domain license

c++czip

提问by Shiva

Does anyone know zip library of C/C++ in public domain license?

有谁知道公共领域许可证中的 C/C++ zip 库?

It meets the following requirements.

它满足以下要求。

  1. It operates by the unit like stb_image.c library
  2. Supported cross platform. Windows, Mac, Linux and so on.
  3. Language is C/C++
  4. License is public domain.
  1. 它由 stb_image.c 库等单元操作
  2. 支持跨平台。Windows、Mac、Linux 等。
  3. 语言是 C/C++
  4. 许可证是公共领域。

回答by dk123

I'd recommend ZipLib.

我会推荐ZipLib

Personal reasons why I love this project:

我喜欢这个项目的个人原因:

  • built around c++11 stl streams(e.g. decompresses into STL streams!)
  • lightweight (no dependencies other than zlib)
  • can be used on both windows & linux
  • 围绕 c++11 stl 流构建(例如,解压为 STL 流!)
  • 轻量级(除了 zlib 没有依赖项)
  • 可以在 windows 和 linux 上使用

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

我花了很长时间才找到这个项目——希望这对某人有所帮助。

回答by RobDangerous

It didn't yet exist when the question was asked. But it does now: miniz- public domain, single C file, explicitly inspired by the likes of stb_image.

提出问题时它还不存在。但它现在做到了:miniz- 公共域,单个 C 文件,明确受 stb_image 之类的启发。

回答by el.pescado

The most popular open source zip implementation is Info-Zip. Deflate algorithm used in zip file format is implemented by zliblibrary. Both are released on liberal, BSD-like license, but not public domain.

最流行的开源 zip 实现是Info-Zip。zip 文件格式中使用的 Deflate 算法由zlib库实现。两者都是在自由的、类似 BSD 的许可下发布的,但不是公共领域。

回答by x-x

It's not public domain, but Minizip, which is included with zlib, meets your other three requirements. It also contains miniunz.c, a very easy to follow zip/unzip example.

它不是公共领域,但包含在zlib 中的Minizip满足您的其他三个要求。它还包含 miniunz.c,一个非常容易理解的 zip/unzip 示例。

回答by greyfade

The closest I can think of would be Xz-utils, which uses the public domain LZMA SDK. It's not zip, per se, nor does it use the deflate algorithm, but it is one of the few compression libraries in the public domain.

我能想到的最接近的是Xz-utils,它使用公共域 LZMA SDK。它本身不是 zip,也不使用 deflate 算法,但它是公共领域中为数不多的压缩库之一。

回答by nobs

Public Domain is the LZMA sdk from 7z http://www.7-zip.org/sdk.html

公共域是来自 7z http://www.7-zip.org/sdk.html的 LZMA sdk

Problem: the documentation is "not existing" :-(

问题:文档“不存在”:-(

回答by eruciform

http://www.bzip.org/is pretty common and a requirement of tons of easy_installs in multiple target languages.

http://www.bzip.org/很常见,需要大量的多种目标语言的 easy_installs。

Update:I realize this is wrong, but it's a common misunderstanding, so I'm leaving it up as a sentinel to describe a frequent error.

更新:我意识到这是错误的,但这是一个常见的误解,所以我将它作为一个哨兵来描述一个频繁的错误。