Skip to content
forked from pedrolcl/libq7zip

7-zip library and buildsystems for Qt applications

License

Notifications You must be signed in to change notification settings

zerlei/libq7zip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libq7zip

7-zip library and buildsystems for Qt based applications.

This repository contains source code from the 7-zip and p7zip projects and some classes from the Qt Installer Framework, with CMake and Qmake buildsystems allowing to build static and dynamic libraries for most operating systems and platforms.

This library allows easy and comfortable file and resource compress and uncompress using the 7z format in Qt applications. The following example snippets are taken from the library unit tests.

compress files

#include <q7z_create.h>
#include <q7z_facade.h>

[...]

Q7z::initSevenZ();
QTemporaryFile target;
target.open();
Q7z::createArchive(&target, QStringList() << path1 << path2);

check compressed archive format

#include <q7z_facade.h>

[...]

Q7z::initSevenZ();
bool ok = Q7z::isSupportedArchive("data.7z")

list compressed archive contents

#include <q7z_facade.h>
#include <q7z_list.h>

[...]

Q7z::initSevenZ();
QFile file(":///testdata.7z"); // embedded resource
file.open(QIODevice::ReadOnly);

QVector<Q7z::File> files = Q7z::listArchive(&file);

extract compressed files

#include <q7z_extract.h>
#include <q7z_facade.h>

[...]

Q7z::initSevenZ();
QFile source(":///testdata.7z"); // embedded resource
source.open(QIODevice::ReadOnly);
Q7z::extractArchive(&source, QDir::tempPath());

About

7-zip library and buildsystems for Qt applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 74.4%
  • C 23.6%
  • Other 2.0%