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 ...
随机推荐
- jdk版本下载
oracleJDK oracle各版本下载地址:https://www.oracle.com/technetwork/java/archive-139210.html openJDK 编译好的 ojd ...
- 保姆级别的RabbitMQ教程!包括Java和Golang两种客户端
目录 什么是AMQP 和 JMS? 常见的MQ产品 安装RabbitMQ 启动RabbitMQ 什么是Authentication(认证) 指定RabbitMQ的启动配置文件 如何让guest用户远程 ...
- 老猿学5G随笔:5G核心网中与用户数据相关的NF功能体UDM、AUSF、PCF、UDR
在业务支撑工作中,与核心网主要的交互包括用户数据管理(含签约关系.策略数据),5G核心网中与用户数据相关的NF功能体包括UDM.AUSF和PCR以及UDR,在此只简单介绍这些NF的功能: UDM:统一 ...
- centos 7系统,解决python3.x 安装后使用yum不能安装的问题(错误:urlgrabber-ext-down | KeyboardInterrupt)
1.在安装python3.xx版本后,通过yum去安装软件会出现问题,目前我遇到的有2种问题 比如显示:urlgrabber-ext-down Downloading packages: File & ...
- FOFA链接爬虫爬取fofa spider
之前一直是用的github上别人爬取fofa的脚本,前两天用的时候只能爬取第一页的链接了,猜测是fofa修改了一部分规则(或者是我不小心删除了一部分文件导致不能正常运行了) 于是重新写了一下爬取fof ...
- 混合云存储打开的正确姿势——腾讯云存储网关 CSG
近年来,随着云计算的发展,越来越多的企业选择将IT系统基础设施转移到云上,上云有助于推动企业加快信息化.数字化.智能化的转型,但是很多企业对传统的业务系统依赖程度较高,短时间内将业务迁移上云将会面临很 ...
- Redis Sentinel-深入浅出原理和实战
本篇博客会简单的介绍Redis的Sentinel相关的原理,同时也会在最后的文章给出硬核的实战教程,让你在了解原理之后,能够实际上手的体验整个过程. 之前的文章聊到了Redis的主从复制,聊到了其相关 ...
- SPFA算法优化
前言 \(SPFA\) 通常在稀疏图中运行效率高于 \(Dijkstra\) ,但是也容易被卡. 普通的 \(SPFA\) 时间复杂度为 \(O(km)\) ,其中 \(k\) 是一条边松弛其端点点的 ...
- js实现元素范围内拖动
元素拖拽,网上一堆的实现,其中很多是原生js写的,都不够简洁,甚至运行后看不到效果. 于是乎,安静地想了下,拖动元素貌似就是一个滑动事件的监听处理,具体操作如下: 1.一个外层DIV,或者直接用根节点 ...
- mysql单机多实例配置
Windows上配置多个mysql实例,主要改下配置文件即可,mysql目录如下: my2中主要改两个配置内容 datadir = D:/Program Files/Mysql/mysql-5.7.2 ...