最新公告
  • 欢迎您光临起源地模板网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境!立即加入钻石VIP
  • libzip开发笔记(一):libzip库介绍、编译和工程模板

    正文概述 掘金(红模仿_红胖子)   2020-12-31   1042

    若该文为原创文章,转载请注明原文出处 本文章博客地址:blog.csdn.net/qq21497936/… 长期持续带来更多项目与技术分享,咨询请加QQ:21497936、微信:yangsir198808
    红胖子(红模仿)的博文大全:开发技术集合(包含Qt实用技术、树莓派、三维、OpenCV、OpenGL、ffmpeg、OSG、单片机、软硬结合等等)持续更新中…(点击传送门)

    Qt开发专栏:三方库开发技术


    前言

      Qt使用一些压缩解压功能,选择libzip库,libzip库比较原始,也是很多其他库的基础支撑库。


    libzip

      libzip是一个C库,用于读取,创建和修改zip档案。可以从数据缓冲区,文件或直接从其他zip归档文件直接复制的压缩数据中添加文件。在不关闭存档的情况下所做的更改可以还原。   当前版本是1.7.3,于2020年7月15日发布。   官网:libzip.org/   QQ群:1047134658(点击“文件”搜索“libzip”,群内与博文同步更新)


    libzip编译

    步骤一:解压

    libzip开发笔记(一):libzip库介绍、编译和工程模板

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

    libzip开发笔记(一):libzip库介绍、编译和工程模板

      需要zlib,之前已经编译过vs2017 x64版本的zlib了,导入再配置 libzip开发笔记(一):libzip库介绍、编译和工程模板

    步骤三:生成工程

    libzip开发笔记(一):libzip库介绍、编译和工程模板

    步骤四:打开VS2017编译

    libzip开发笔记(一):libzip库介绍、编译和工程模板

    步骤五:安装install

    libzip开发笔记(一):libzip库介绍、编译和工程模板


    模块化

    libzip开发笔记(一):libzip库介绍、编译和工程模板


    补充:查看命令行工具帮助和源码辅助开发

    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.
    

    工程模板v1.0.0

      对应工程模板:zipDemo_v1.0.0_基础模板_zip库的基础环境.rar


    若该文为原创文章,转载请注明原文出处 本文章博客地址:blog.csdn.net/qq21497936/…


    起源地下载网 » libzip开发笔记(一):libzip库介绍、编译和工程模板

    常见问题FAQ

    免费下载或者VIP会员专享资源能否直接商用?
    本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
    提示下载完但解压或打开不了?
    最常见的情况是下载不完整: 可对比下载完压缩包的与网盘上的容量,若小于网盘提示的容量则是这个原因。这是浏览器下载的bug,建议用百度网盘软件或迅雷下载。若排除这种情况,可在对应资源底部留言,或 联络我们.。
    找不到素材资源介绍文章里的示例图片?
    对于PPT,KEY,Mockups,APP,网页模版等类型的素材,文章内用于介绍的图片通常并不包含在对应可供下载素材包内。这些相关商业图片需另外购买,且本站不负责(也没有办法)找到出处。 同样地一些字体文件也是这种情况,但部分素材会在素材包内有一份字体下载链接清单。
    模板不会安装或需要功能定制以及二次开发?
    请QQ联系我们

    发表评论

    还没有评论,快来抢沙发吧!

    如需帝国cms功能定制以及二次开发请联系我们

    联系作者

    请选择支付方式

    ×
    迅虎支付宝
    迅虎微信
    支付宝当面付
    余额支付
    ×
    微信扫码支付 0 元