zip和解压缩文件c ++ [英] zip and unzip file c++

查看:889
本文介绍了zip和解压缩文件c ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写将文件夹压缩到.zip文件的代码,或者将.zip文件解压缩到文件夹中。我相信我需要一些支持它的库,我是对吗?如果是,是否有一个特定的库我应该使用?我想在C ++中的Linux机器(Ubuntu)上编写代码。
感谢您的帮助。

I want to write code that zips a folder to a .zip file, or unzips a .zip file into a folder. I believe I need some library that supports it, am I right? If so, is there a specific library I should use? I want to write the code in C++ on a Linux machine (Ubuntu). Thanks for the help.

推荐答案

我会推荐 LZMA / 7 Zip 库。它支持各种各样的压缩格式,可用于几乎任何类型的(OS)环境。库API在C中,你可以只是选择你所需要的目的(只是解压缩,压缩或两者)很容易。它还提供了一个开源许可证,可以很容易地在任何类型的项目(商业或操作系统)中使用。

I would recommend the LZMA/7 Zip library. It supports a broad variety of compression formats and is usable for almost any kind of (OS) environment. The library API is in C and you can just pick what you need for your purpose (just decompression, compression or both) easily. It's also coming with an open source license that makes it easy to use in any kind of project (commercial or OS).

我们正在使用这个库在一些嵌入式项目成功。

We're using this library in a number of embedded projects successfully.

这篇关于zip和解压缩文件c ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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