首页 技术 正文
技术 2022年11月14日
0 收藏 438 点赞 4,695 浏览 2602 个字

 

前言

  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 anySupported 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 entrySupported flags are:
0 (no flags)
C ZIP_FL_NOCASE
c ZIP_FL_CENTRAL
d ZIP_FL_NODIR
l ZIP_FL_LOCAL
u ZIP_FL_UNCHANGEDSupported compression methods are:
default
deflate
storeSupported encryption methods are:
none
AES-128
AES-192
AES-256
PKWAREThe index is zero-based.

   

上一篇: MVC + JQUERY + AJAX
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,499
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,913
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,746
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,503
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,142
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,305