quazip

Qt使用QuaZIP 压缩/解压文件

女生的网名这么多〃 提交于 2020-11-14 10:39:03
QuaZIP 是使用Qt对zlib封装的一个开源库, 为知笔记Linux版使用Quazip处理zip文件。 1. Quazip的下载与编译 (1) 下载 URL : http://quazip.sourceforge.net/index.html (2) 编译 linux下的编译QuaZIP官网上有说明,这里说下怎么在Windows下编译。 A: 点击 quazip-0.6.2\quazip\quazip.pro,在QtCreator中打开Quazip项目。 B: 在quazip.pri中加一行: INCLUDEPATH += C:\Qt\Qt5.2.1\5.2.1\msvc2010\ include \QtZlib C: 右键qmake, 然后构建。 2. 项目中导入QuaZIP (1)按下面的结构把QuaZIP引入项目,下面的目录结构是Qt官方文档中使用的方式 bin下放编译好的 quazip.dll; lib下放quazip的lib文件 quazip.lib; include下放quazip的头文件; (2) 在项目的pro文件中加入: win32:CONFIG(release, debug|release): LIBS += -L$$PWD/3rdparty/quazip/lib/ -lquazip else:win32:CONFIG(debug, debug

Qt: Simple Example for Quazip

拈花ヽ惹草 提交于 2019-12-21 04:40:51
问题 I built the quazip library. I need a simple example that shows how to unzip a zip File. For example. Quazip zipFile( QFile("test.zip") ); zipFile.unzip(); Tests shown in quazip is little bit confusing. I searched for a brief amount of time to find an example and I wasn't able to find one. 回答1: Here is a quick example showing how to read the files. You will need to make some modifications to the code in the loop to write the data to a file or perform whatever operations your application

How to connect the QuaZip library in CMake

心不动则不痛 提交于 2019-12-13 04:23:20
问题 My project uses the QuaZip library, and I need to build the project through CMake. How to add this library to CMakeLists? From the library I need JlCompress My CMakeLists: cmake_minimum_required(VERSION 3.6) #set_property(GLOBAL PROPERTY USE_FOLDERS ON) #set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "cmake") set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) project(Archiver LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) find_package(Qt5 REQUIRED COMPONENTS Core Widgets

how to report progress of data read on a QuaGzipFile (QuaZIP library)

廉价感情. 提交于 2019-12-11 12:18:11
问题 I am using QuaZIP 0.5.1 with Qt 5.1.1 for C++ on Ubuntu 12.04 x86_64. My program reads a large gzipped binary file, usually 1GB of uncompressed data or more, and makes some computations on it. It is not computational-extensive, and most of the time is passed on I/O. So if I can find a way to report how much data of the file is read, I can report it on a progress bar, and even provide an estimation of ETA. I open the file with: QuaGzipFile gzip(fileName); if (!gzip.open(QIODevice::ReadOnly)) {

linking QuaZip with Qt 4.8.0 into project

拟墨画扇 提交于 2019-12-11 04:35:40
问题 I have a project where I want to unzip files. I have found Quazip to be close to the implementation I want(check), but.... when build the project the compiler says Makefile.Release:241: warning: overriding commands for target release/moc_quazipfile.o' Makefile.Release:219: warning: ignoring old commands for target release/moc_quazipfile.o' release\moc_quazipfile.cpp:40: warning: 'static void QuaZipFile::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)' redeclared without dllimport

How can I zip a directory/folder with quazip?

为君一笑 提交于 2019-12-07 08:21:44
问题 I have a directory with files and folders that I would like to zip. I'm using the qt-project quazip for it. So I thought I write a function that packs all content of a directory including the filestructure. How can I create the folder in the zip-file? I tried it with QuaZipNewInfo but couldn't make it work. For example I want to zip the tmp-folder with this content: tmp/1.txt tmp/folder1/2.txt tmp/folder1/3.txt tmp/folder2/4.txt tmp/folder2/folder3/5.txt What I get after extracting the file