28 #ifndef OSDAB_UNZIP__H
29 #define OSDAB_UNZIP__H
31 #include "zipglobal.h"
33 #include <QtCore/QDateTime>
34 #include <QtCore/QMap>
35 #include <QtCore/QtGlobal>
45 OSDAB_BEGIN_NAMESPACE(
Zip)
69 HeaderConsistencyError,
77 ExtractPaths = 0x0001,
81 Q_DECLARE_FLAGS(ExtractionOptions, ExtractionOption)
83 enum CompressionMethod
85 NoCompression, Deflated, UnknownCompression
100 quint32 compressedSize;
101 quint32 uncompressedSize;
104 QDateTime lastModified;
106 CompressionMethod compression;
117 ErrorCode openArchive(
const QString& filename);
118 ErrorCode openArchive(QIODevice* device);
121 QString archiveComment()
const;
125 bool contains(
const QString& file)
const;
127 QStringList fileList()
const;
128 QList<ZipEntry> entryList()
const;
130 ErrorCode extractAll(
const QString& dirname, ExtractionOptions options = ExtractPaths);
131 ErrorCode extractAll(
const QDir& dir, ExtractionOptions options = ExtractPaths);
133 ErrorCode extractFile(
const QString& filename,
const QString& dirname, ExtractionOptions options = ExtractPaths);
134 ErrorCode extractFile(
const QString& filename,
const QDir& dir, ExtractionOptions options = ExtractPaths);
135 ErrorCode extractFile(
const QString& filename, QIODevice* device, ExtractionOptions options = ExtractPaths);
137 ErrorCode extractFiles(
const QStringList& filenames,
const QString& dirname, ExtractionOptions options = ExtractPaths);
138 ErrorCode extractFiles(
const QStringList& filenames,
const QDir& dir, ExtractionOptions options = ExtractPaths);
140 void setPassword(
const QString& pwd);
146 Q_DECLARE_OPERATORS_FOR_FLAGS(UnZip::ExtractionOptions)
150 #endif // OSDAB_UNZIP__H
Zip file compression.
Definition: zip.h:48
ErrorCode
Definition: unzip.h:52
PKZip 2.0 file decompression. Compatibility with later versions is not ensured as they may use unsupp...
Definition: unzip.h:49
ExtractionOption
Definition: unzip.h:74