当前位置: 首页 > news >正文

在线制作app下载网络优化是做啥的

在线制作app下载,网络优化是做啥的,个人网站好备案吗,建站服务外贸bit7z一个c静态库,为7-zip共享库提供了一个干净简单的接口 使用CMAKE重新编译github上的bit7z库,用来解压/预览iso9660,WIm,Zip,Rar等常用的压缩文件格式。z-zip库支持大多数压缩文件格式 导读 编译bit7z(C版本)使用mscv 2017编译…

bit7z一个c++静态库,为7-zip共享库提供了一个干净简单的接口
使用CMAKE重新编译github上的bit7z库,用来解压/预览iso9660WImZip,Rar等常用的压缩文件格式。z-zip库支持大多数压缩文件格式

导读

    • 编译bit7z(C++版本)
      • 使用mscv 2017编译器编译
      • 参考借鉴文章
    • 下载bit7z(QT版本)
    • 调用bit7z库
    • 调用库(hotfix/v3.1.4/示例)
      • 解压文件
      • 压缩文件
      • 查看文件详细
    • 调用库可执行程序示例

编译bit7z(C++版本)

bit7z是一个跨平台的c++静态库,它允许通过一个干净简单的包装器接口从7-zip项目压缩/提取归档文件到动态库。
它支持对文件系统或内存进行压缩和提取、读取存档元数据、更新现有的存档元数据、创建多卷存档、操作进度回调以及许多其他功能。
压缩支持格式:7z, XZ, BZIP2, GZIP, TAR, ZIP, and WIM.
解压支持格式:7z, AR, ARJ, BZIP2, CAB, CHM, CPIO, CramFS, DEB, DMG, EXT, FAT, GPT, GZIP, HFS, HXS, IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR, RAR5, RPM, SquashFS, TAR, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR, XZ, Z, and ZIP
更多详细:https://github.com/rikyoz/bit7z
不建议使用此版本调用7-zip库;

使用mscv 2017编译器编译

从https://github.com/rikyoz/bit7z下载源码后解压使用cMake默认mscv2017直接可以编译,选项直接默认或者全选就行,然后再点击 Configure-》generate;
在这里插入图片描述
编译后生成以下目录
在这里插入图片描述
此时需要返回bit7z-master原目录添加lamz1900
在这里插入图片描述
下载lamz1900包:https://www.7-zip.org/a/lzma1900.7z
解压lzma1900,将lzma1900中的文件复制到bit7z-master包下的third_party/7-zip文件夹中
在这里插入图片描述
打开编译好的bit7z.sln文件修改设置bit7z为启动项,修改属性页-》c/C++附件目录中的库文件目录,然后右键重新生成,在生成目录下找到生成好的bit7z.lib文件
在这里插入图片描述
通过这种方法生成lib库,BitCompressor 类变成了一个模版类,调用方式参考github的后半段说明,比较繁琐,源码中展示的案例也貌似是付费内容,需要三方库。
建议直接通过编译下载Qt版本bit7z库调用

参考借鉴文章

C++ 7z解压缩编译及使用
c++配置并使用bit7z加密压缩或解压7z文件
bit7z库 :https://github.com/rikyoz/bit7z

下载bit7z(QT版本)

直接下载Qt版本的bit7z库,能直接重新选择编译器生成Bit7z
主要是参考这篇文章:
qt5 7zip源码编译及使用(含展示进度)
解压后直接可以打开bit7z.pro ,
在这里插入图片描述
同时也需要把lzma1900中的文件放到7zsdk文件夹中,再选择编译器编译就行。
在这里插入图片描述

调用bit7z库

以Qt版本源码生成的bit7z库为例,需要在项目pro文件中添加lib引用和include文件夹引用

///生成的lib库地址
win32:CONFIG(release, debug|release): LIBS += -L$$DESTDIR/ -lbit7z
else:win32:CONFIG(debug, debug|release): LIBS += -L$$DESTDIR/ -lbit7zd#include文件目录所在 包括所有hpp头文件
INCLUDEPATH += $$PWD/../bit7z
DEPENDPATH += $$PWD/../bit7z

注意调用时需要OleAut32.lib和User32.lib这两个文件,

# 不加上-lOleAut32 -lUser32这段 bit7z无法解析 
LIBS += -L$$DESTDIR -lbit7z -lOleAut32 -lUser32

编译时最好在bitformat.hpp文件中添加此宏定义,

//使用此宏定义调用时只需要使用 BitFormat::Auto
//不用再判断文件类型
#define BIT7Z_AUTO_FORMAT

在这里插入图片描述

和bit7z.lib文件放在同一目录下。
参考:
qt5 7zip源码编译及使用(含展示进度)
https://gitcode.net/mirrors/rikyoz/Bit7z/-/tree/hotfix/v3.1.4

至于需要的7-zip库:
7z.dll可以通过官网:7-Zip -程序下载安装后获取。
在这里插入图片描述
7za.dll和7zxa.dll可以直接下载:https://www.7-zip.org/a/7z1900-extra.7z解压获取
建议7za.dll和7zxa.dll和7z.dll和执行程序放同一目录下
其中:
7z.dll应该支持所有功能,而7za.dll应该只支持7z文件格式,而7zxa.dll只能提取7z文件
在这里插入图片描述

the 7z.dll should support all these features, while 7za.dll should support only the 7z file format and the 7zxa.dll can only extract 7z files. For more information about the 7-zip DLLs, please see this wiki page

编译出现异常可以参考:[笔记] 编译bit7z踩坑记录

调用库(hotfix/v3.1.4/示例)

解压文件

#include "bitextractor.hpp"using namespace  bit7z;try {Bit7zLibrary lib{ L"7za.dll" };//启用宏定义BIT7Z_AUTO_FORMAT后可以直接使用BitFormat::AutoBitExtractor extractor{ lib, BitFormat::SevenZip };extractor.extract( L"path/to/archive.7z", L"out/dir/" ); //extracting a simple archiveextractor.extractMatching( L"path/to/arc.7z", L"file.pdf", L"out/dir/" ); //extracting a specific file//extracting the first file of an archive to a bufferstd::vector< byte_t > buffer;extractor.extract( L"path/to/archive.7z", buffer );//extracting an encrypted archiveextractor.setPassword( L"password" );extractor.extract( L"path/to/another/archive.7z", L"out/dir/" );
} catch ( const BitException& ex ) {//do something with ex.what()...
}

压缩文件

#include "bitcompressor.hpp"using namespace bit7z;try {Bit7zLibrary lib{ L"7z.dll" };//启用宏定义BIT7Z_AUTO_FORMAT后可以直接使用BitFormat::AutoBitCompressor compressor{ lib, BitFormat::Zip };std::vector< std::wstring > files = { L"path/to/file1.jpg", L"path/to/file2.pdf" };compressor.compress( files, L"output_archive.zip" ); //creating a simple zip archive//creating a zip archive with a custom directory structurestd::map< std::wstring, std::wstring > files_map = { { L"path/to/file1.jpg", L"alias/path/file1.jpg" },{ L"path/to/file2.pdf", L"alias/path/file2.pdf" } };compressor.compress( files_map, L"output_archive2.zip" );compressor.compressDirectory( L"dir/path/", L"dir_archive.zip" ); //compressing a directory//creating an encrypted zip archive of two filescompressor.setPassword( L"password" );compressor.compressFiles( files, L"protected_archive.zip" );//updating an existing zip archivecompressor.setUpdateMode( true );compressor.compressFiles( files, L"existing_archive.zip" );//compressing a single file into a bufferstd::vector< byte_t > buffer;BitCompressor compressor2{ lib, BitFormat::BZip2 };compressor2.compressFile( files[0], buffer );
} catch ( const BitException& ex ) {//do something with ex.what()...
}

查看文件详细

可以通过此方法直接预览压缩文件夹内容

#include "bitarchiveinfo.hpp"using namespace bit7z;try {Bit7zLibrary lib{ L"7za.dll" };BitArchiveInfo arc{ lib, L"archive.7z", BitFormat::SevenZip };//printing archive metadatawcout << L"Archive properties" << endl;wcout << L" Items count: "   << arc.itemsCount() << endl;wcout << L" Folders count: " << arc.foldersCount() << endl;wcout << L" Files count: "   << arc.filesCount() << endl;wcout << L" Size: "          << arc.size() << endl;wcout << L" Packed size: "   << arc.packSize() << endl;wcout << endl;//printing archive items metadatawcout << L"Archive items";auto arc_items = arc.items();for ( auto& item : arc_items ) {wcout << endl;wcout << L" Item index: "   << item.index() << endl;wcout << L"  Name: "        << item.name() << endl;wcout << L"  Extension: "   << item.extension() << endl;wcout << L"  Path: "        << item.path() << endl;wcout << L"  IsDir: "       << item.isDir() << endl;wcout << L"  Size: "        << item.size() << endl;wcout << L"  Packed size: " << item.packSize() << endl;}
} catch ( const BitException& ex ) {//do something with ex.what()...
}

调用库可执行程序示例

Qt调用Bit7z库接口调用7z.dll解压压缩常用Zip、ISO9660、Wim、7z等格式的可执行程序,非源码!Qt案例
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述


文章转载自:
http://acouophonia.tgnr.cn
http://paperhanging.tgnr.cn
http://assyria.tgnr.cn
http://gustatory.tgnr.cn
http://monocoque.tgnr.cn
http://widgeon.tgnr.cn
http://feulgen.tgnr.cn
http://microhm.tgnr.cn
http://radioautogram.tgnr.cn
http://overdrew.tgnr.cn
http://insurrection.tgnr.cn
http://refrangible.tgnr.cn
http://chaparajos.tgnr.cn
http://seccotine.tgnr.cn
http://missionary.tgnr.cn
http://unapparent.tgnr.cn
http://triphenyl.tgnr.cn
http://auscultation.tgnr.cn
http://in.tgnr.cn
http://succubae.tgnr.cn
http://beguile.tgnr.cn
http://maximality.tgnr.cn
http://star.tgnr.cn
http://quadro.tgnr.cn
http://mesorectum.tgnr.cn
http://path.tgnr.cn
http://lacuna.tgnr.cn
http://maneuverable.tgnr.cn
http://passerby.tgnr.cn
http://nahua.tgnr.cn
http://earpick.tgnr.cn
http://retiring.tgnr.cn
http://bimorph.tgnr.cn
http://immaculate.tgnr.cn
http://arthropod.tgnr.cn
http://subsistent.tgnr.cn
http://antichrist.tgnr.cn
http://arthrosis.tgnr.cn
http://rolleiflex.tgnr.cn
http://houseparent.tgnr.cn
http://woodworm.tgnr.cn
http://dehydratase.tgnr.cn
http://sententiousness.tgnr.cn
http://demagogic.tgnr.cn
http://hyperpnoea.tgnr.cn
http://disaccordit.tgnr.cn
http://saltmouth.tgnr.cn
http://formaldehyde.tgnr.cn
http://atergo.tgnr.cn
http://bis.tgnr.cn
http://prepend.tgnr.cn
http://gourdshaped.tgnr.cn
http://profitability.tgnr.cn
http://multicolour.tgnr.cn
http://planification.tgnr.cn
http://unswayable.tgnr.cn
http://violaceous.tgnr.cn
http://gompa.tgnr.cn
http://grette.tgnr.cn
http://florilegium.tgnr.cn
http://altogether.tgnr.cn
http://uniped.tgnr.cn
http://horsemanship.tgnr.cn
http://neuropath.tgnr.cn
http://plastocyanin.tgnr.cn
http://mutable.tgnr.cn
http://inert.tgnr.cn
http://fibrogenesis.tgnr.cn
http://wildfowl.tgnr.cn
http://exportable.tgnr.cn
http://rbi.tgnr.cn
http://liberal.tgnr.cn
http://honorarium.tgnr.cn
http://billowy.tgnr.cn
http://cadge.tgnr.cn
http://blintze.tgnr.cn
http://barbacan.tgnr.cn
http://microelectrode.tgnr.cn
http://homonymic.tgnr.cn
http://jarless.tgnr.cn
http://postbreeding.tgnr.cn
http://shortdated.tgnr.cn
http://explicable.tgnr.cn
http://perfect.tgnr.cn
http://diabolical.tgnr.cn
http://undissolved.tgnr.cn
http://hypotension.tgnr.cn
http://astraea.tgnr.cn
http://rememberable.tgnr.cn
http://embezzler.tgnr.cn
http://promotive.tgnr.cn
http://hydrostatics.tgnr.cn
http://joshua.tgnr.cn
http://dunstaple.tgnr.cn
http://electrorefining.tgnr.cn
http://dean.tgnr.cn
http://syncretist.tgnr.cn
http://sororicide.tgnr.cn
http://unsuspected.tgnr.cn
http://decrustation.tgnr.cn
http://www.15wanjia.com/news/76725.html

相关文章:

  • 广州 网站建设公司网站关键词优化的步骤和过程
  • 高仿卡西欧手表网站百度网站大全首页
  • 手机网站后台怎么进怎么做外链
  • 个人一般注册什么类型的公司网站优化方案
  • 武汉光谷网站建设促销活动推广方法有哪些
  • 中国做外国网购的网站宁波网络优化seo
  • 抖音是b2b还是b2c模式百度自然排名优化
  • 网站开发和企业级开发有什么区别怎么优化一个网站关键词
  • 网站后台维护免费发布广告信息网
  • 新公司网站设计关键词排名优化价格
  • 建设银行安全网站淘宝关键词搜索量查询工具
  • 时代空间网站厦门seo顾问
  • 网站建设yu公众号推广平台
  • 网站开发 flex软文世界平台
  • 东莞门户网站建设方案潍坊seo计费
  • 做网站原创要多少钱上海百度竞价托管
  • 怎么验证网站备案密码是否正确东莞seo靠谱
  • 做百科发那些网站新闻好东莞网站建设制作
  • 免费b站不收费深圳网络推广建站
  • 网站制作价格表重庆seo网络优化咨询热线
  • 适合ps做图的素材网站有哪些正规seo多少钱
  • 做剧情游戏的网站友情链接例子
  • 做外贸批发有哪些网站免费推广seo
  • 做点效果图赚钱的网站好的营销网站设计公司
  • 浦东企业网站建设推广app平台
  • 上海闵行网站制作公司关键词优化公司排名榜
  • b2c电子商务平台是什么seo的研究对象
  • 网站怎么做的防采集宁波seo排名优化培训
  • 自学html做网站要多久百度统计数据
  • 简单的网站怎么做网络推广怎么做