独立跨平台(Windows / Linux))C / C ++文件压缩? [英] Standalone Cross Platform (Windows/Linux)) File Compression for C/C++?

查看:231
本文介绍了独立跨平台(Windows / Linux))C / C ++文件压缩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个(很小的)C或C ++的开源库,我可以包含在我的MIT许可项目(托管在谷歌代码)。我是一个爱好的C / C ++程序员,所以我不是那么高级,但是我只知道我需要为名为SA-MP的应用程序开发插件(在Windows和Linux上工作)。
我愿意做的是一个自动安装程序,需要能够解压缩压缩文件(可以压缩.zip,但任何其他文件压缩方法都可以)。

I am looking for a (prefferably small) open source library in C or C++ which I can include in my MIT licensed projects (hosted on google code). I am a hobby C/C++ programmist so I am not that advanced, however I know just the things I need to develop plugins for a application named "SA-MP" (works on Windows and Linux). What I am willing to make is an auto installer which will need to be able to uncompress compressed files (prefferably .zip, but any other file compression method will do!).

我已经找到这样的库,但他们总是需要有一些额外的dll的窗口或一些其他文件在linux - 这不是我正在寻找的,因为最终用户可能无法知道如何安装插件及其必需的组件。

I have looked for such a library but they always need to have some extra dll's on windows or some other files on linux - which is not the thing I am looking for as the end-users may not be able to know how to install the plugin with it's required components.

还看到基本压缩库,它似乎没有文件压缩,而只是算法。

Looked also at Basic Compression Library and it seems it doesn't have file compression, but just algorithms. So with that one I'm out of luck.

为了使上面的文本简短:

To make the above text short:


  • 没有外部依赖,如果可以链接到我的C / C ++项目,则允许需要额外的库。

  • 可以压缩整个目录并解压缩。

  • 可以安全地用于MIT许可(可选,优先)


    • No external depencies, extra libraries which are needed are allowed if they can be linked to my C/C++ project.
    • Can compress whole directories and unpack them.
    • Works on windows and linux.
    • Can be safely used with MIT license (optional, preffered)

    推荐答案

    zlib (这是显而易见的第一件事,每个人都使用它)或 libzip (首先点击< a href =http://freshmeat.net =nofollow> freshmeat )?

    What's wrong with zlib (that's the obvious first thing to look at; everybody uses that) or libzip (first hit on freshmeat)?


    • zlib:库本身只提供压缩,但是有一个zip格式的示例实现可以使用。 zlib许可证是略有修改的MIT / X许可证,因此应该兼容。

    • libzip:支持zip格式。 BSD修订的许可证;你必须维护它,但它基本上等同于MIT / X许可证。也可以静态链接。

    一般来说,没有技术链接任何动态。你不是。但是,对于LGPL许可的库有一个合法的原因,因为LGPL停在动态对象边界,所以静态链接也使其他代码LGPL。

    In general, there is no technical reason why you'd need to link anything dynamically. You don't. There is, however, a legal reason for LGPL-licensed libraries, because LGPL stops at dynamic object boundary, so static linking makes the other code LGPL as well.

    这篇关于独立跨平台(Windows / Linux))C / C ++文件压缩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆