If the paper is original articles, reprint please indicate the original source This article blog: blog.csdn.net/qq21497936/… Long term continue to bring more projects and technology to share, consulting please add QQ:21497936, wechat: Yangsir198808 red fatty (red imitate) blog: Development technology set (including Qt practical technology, raspberry PI, 3D, OpenCV, OpenGL, FFMPEG, OSG, SCM, soft and hard combination, etc.) continue to update… (Click on the portal)

Qt Development column: Tripartite library development techniques


preface

Qt uses the libzip library, which is the base of many other libraries.


libzip

Libzip is a C library for reading, creating, and modifying ZIP files. Files can be added from data buffers, files, or compressed data copied directly from other ZIP archive files. Changes made without closing the archive can be restored. The current version is 1.7.3, released on July 15, 2020. QQ group: 1047134658 (click “file” to search for “libzip”, update the group with the blog post)


Libzip compilation

Step 1: Decompress

Step 2: Cmake configuration (VS2017 X64)

Zlib needs to be compiled before vs2017 x64 zlib, import and configure

Step 3: Generate the project

Step 4: Open VS2017 compilation

Step 5: Install


modular


Added: See command-line tool help and source aid for development

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.Copy the code


Project template V1.0.0

Corresponding project template: zipdemo_v1.0.0_ Base template _Base environment of the zip library. Rar


If the paper is original articles, reprint please indicate the original source This article blog: blog.csdn.net/qq21497936/…