libzip开发笔记(一):libzip库介绍、编译和工程模板
前言
Qt使用一些压缩解压功能,选择libzip库,libzip库比较原始,也是很多其他库的基础支撑库。
libzip
libzip是一个C库,用于读取,创建和修改zip档案。可以从数据缓冲区,文件或直接从其他zip归档文件直接复制的压缩数据中添加文件。在不关闭存档的情况下所做的更改可以还原。
当前版本是1.7.3,于2020年7月15日发布。
官网:https://libzip.org/
QQ群:1047134658(点击“文件”搜索“libzip”,群内与博文同步更新)
libzip编译
步骤一:解压

步骤二:Cmake配置(vs2017 x64版本)

需要zlib,之前已经编译过vs2017 x64版本的zlib了,导入再配置
步骤三:生成工程

步骤四:打开VS2017编译

步骤五:安装install

模块化

补充:查看命令行工具帮助和源码辅助开发
ziptool.exe -h
usage: ziptool.exe [-ceghnrst] [-l len] [-o offset] archive command1 [args] [command2 [args] ...]
Supported options are:
-c check consistency
-e error if archive already exists (only useful with -n)
-g guess file name encoding (for stat)
-h display this usage
-l len only use len bytes of file
-n create archive if it doesn't exist
-o offset start reading file at offset
-r print raw file name encoding without translation (for stat)
-s follow file name convention strictly (for stat)
-t disregard current archive contents, if any
Supported commands and arguments are:
add name content
add file called name using content
add_dir name
add directory
add_file name file_to_add offset len
add file to archive, len bytes starting from offset
add_from_zip name archivename index offset len
add file from another archive, len bytes starting from offset
cat index
output file contents to stdout
count_extra index flags
show number of extra fields for archive entry
count_extra_by_id index extra_id flags
show number of extra fields of type extra_id for archive entry
delete index
remove entry
delete_extra index extra_idx flags
remove extra field
delete_extra_by_id index extra_id extra_index flags
remove extra field of type extra_id
get_archive_comment
show archive comment
get_extra index extra_index flags
show extra field
get_extra_by_id index extra_id extra_index flags
show extra field of type extra_id
get_file_comment index
get file comment
get_num_entries flags
get number of entries in archive
name_locate name flags
find entry in archive
print_progress
print progress during zip_close()
rename index name
rename entry
replace_file_contents index data
replace entry with data
set_archive_comment comment
set archive comment
set_extra index extra_id extra_index flags value
set extra field
set_file_comment index comment
set file comment
set_file_compression index method compression_flags
set file compression method
set_file_dostime index time date
set file modification time and date (DOS format)
set_file_encryption index method password
set file encryption method
set_file_mtime index timestamp
set file modification time
set_file_mtime_all timestamp
set file modification time for all files
set_password password
set default password for encryption
stat index
print information about entry
Supported flags are:
0 (no flags)
C ZIP_FL_NOCASE
c ZIP_FL_CENTRAL
d ZIP_FL_NODIR
l ZIP_FL_LOCAL
u ZIP_FL_UNCHANGED
Supported compression methods are:
default
deflate
store
Supported encryption methods are:
none
AES-128
AES-192
AES-256
PKWARE
The index is zero-based.
libzip开发笔记(一):libzip库介绍、编译和工程模板的更多相关文章
- Qt开发笔记:OpenSSL库介绍、windows上mingw32版本的OpenSSL编译模块化
前言 Windows上mingw32版本的openssl的编译是属于比较棘手的,OpenSSL本身不提供支持.. OpenSSL 介绍 OpenSSL是一个开放源代码的软件库包,应用程序可 ...
- libzip开发笔记(二):libzip库介绍、ubuntu平台编译和工程模板
前言 Qt使用一些压缩解压功能,选择libzip库,libzip库比较原始,也是很多其他库的基础支撑库,编译过了windows版本,有需求编译一个ubuntu版本的,交叉编译需求的同样可参照本文章 ...
- Gif开发笔记(一):gif介绍、编译和工程模板
前言 实现gif图片的解码和生成. Gif 简介 GIF格式的名称是Graphics Interchange Format的缩写,是在1987年由Compu Serve公司为了填补跨平 ...
- iOS学习笔记9 - 组件库介绍1
总算成功开发完了第一个较大的功能(即时通信).毕竟不可能什么东西都从轮子开始造,于是用到了一些组件,这里简单列举一下吧. 1. FMDB 作为一种文件型的数据存储方式,SQLite在iOS开发中自然也 ...
- 流媒体服务器开发笔记(2)--RTCP协议介绍
http://blog.sina.com.cn/s/blog_53061af00100o2no.html ——————————————————————————————————————————————— ...
- iOS陆哥开发笔记(七) (AVFoundation简单介绍)
在AVFoundation框架中AVAudioRecorder类专门处理录音操作,支持多种音频格式. 以下是经常使用的属性和方法: 属性 说明 @property(readonly, getter=i ...
- Qt+MPlayer音乐播放器开发笔记(一):ubuntu上编译MPlayer以及Demo演示
前言 在ubuntu上实现MPlayer播放器播放音乐. Demo Mplayer MPlayer是一款开源多媒体播放器,以GNU通用公共许可证发布.此款软件 ...
- SDL开发笔记(二):音频基础介绍、使用SDL播放音频
若该文为原创文章,未经允许不得转载原博主博客地址:https://blog.csdn.net/qq21497936原博主博客导航:https://blog.csdn.net/qq21497936/ar ...
- zlib开发笔记(四):zlib库介绍、编译windows vs2015x64版本和工程模板
前言 Qt使用一些压缩解压功能,介绍过libzip库编译,本篇说明zlib库.需要用到zlib的msvc2015x64版本,编译一下. 版本编译引导 zlib在windows上的mingw32 ...
随机推荐
- 解决 win7 win10 等 64位 支持access数据库问题
好多年不写ASP+ACCESS了,这两天帮朋友做个网站,碰到这个问题: ADODB.Connection 错误 '800a0e78' 对象关闭时,不允许操作. 记录一下. 以下内容转载自:https: ...
- 第4章 基础知识进阶 第4.1节 Python基础概念之迭代、可迭代对象、迭代器
第四章 基础知识进阶第十七节 迭代.可迭代对象.迭代器 一. 引言 本来计划讲完元组和字典后就讲列表解析和字典解析,但要理解列表解析和字典解析,就需要掌握Python的高级的类型迭代器,因此本节 ...
- 第8.29节 使用MethodType将Python __setattr__定义的实例方法与实例绑定
一. 引言 在<第7.14节Python类中的实例方法解析>介绍了使用"实例对象名.方法名 = MethodType(函数, 对象)"将动态定义的方法与实例进行绑定 在 ...
- PyQt学习随笔:Model/View开发时从Model相关类派生自定义类需要注意的问题
在<PyQt学习随笔:重写setData方法截获Model/View中视图数据项编辑的注意事项>介绍的方法,从Model相关类派生自定义类,通过重写setData方法以获取View中数据的 ...
- Scrum 冲刺第六天
一.每日站立式会议 1.会议内容 1)进行每日工作汇报 张博愉: 昨天已完成的工作:学习如何编写用户手册 今日工作计划:编写测试计划 工作中遇到的困难:文档不知如何动手 张润柏: 昨天已完成的工作:完 ...
- 题解-JSOI2011 分特产
题面 JSOI2011 分特产 有 \(n\) 个不同的盒子和 \(m\) 种不同的球,第 \(i\) 种球有 \(a_i\) 个,用光所有球,求使每个盒子不空的方案数. 数据范围:\(1\le n, ...
- 题解-Happy New Year
题解-Happy New Year Happy New Year 给定 \(n\),\(m\) 和 \(k\).有一个序列 \(a\{m\}\) 初始值为 \(0\).有 \(n\) 种操作,每种可以 ...
- 记一次storm提交任务遇到的坑
摘要:主要是自己没有真正理解storm jar命令参数的意义. 情景复现: 在storm集群中使用命令提交后,在UI界面中,一直看不见任务提交上来的任务,但是在集群提交的shell界面中,是可以看到相 ...
- HBuilder云端打包+个推
1.个推上登记应用. 应用名称和应用标识,在HBuilder的云端打包配置中获取. 应用证书:必需要有苹果开发者账号,并且加入了"iOS Developer Program".加入 ...
- 一篇文章掌握Nginx核心文件结构
1 Nginx核心配置结构 2 配置模块详解 设置worker进程的用户,指的linux中的用户,会涉及到nginx操作目录或文件的一些权限,默认为nobody user root; worker进程 ...