39 #ifndef OSDAB_UNZIP_P__H
40 #define OSDAB_UNZIP_P__H
43 #include "zipentry_p.h"
45 #include <QtCore/QObject>
46 #include <QtCore/QtGlobal>
50 #define UNZIP_READ_BUFFER (256*1024)
52 OSDAB_BEGIN_NAMESPACE(
Zip)
64 bool skipAllEncrypted;
66 QMap<QString,ZipEntryP*>* headers;
71 char buffer1[UNZIP_READ_BUFFER];
72 char buffer2[UNZIP_READ_BUFFER];
74 unsigned char* uBuffer;
75 const quint32* crcTable;
86 quint16 unsupportedEntryCount;
98 UnZip::ErrorCode extractFile(
const QString& path,
const ZipEntryP& entry,
const QDir& dir, UnZip::ExtractionOptions options);
99 UnZip::ErrorCode extractFile(
const QString& path,
const ZipEntryP& entry, QIODevice* device, UnZip::ExtractionOptions options);
102 bool testKeys(
const ZipEntryP& header, quint32* keys);
104 bool createDirectory(
const QString& path);
106 inline void decryptBytes(quint32* keys,
char*
buffer, qint64 read);
108 inline quint32 getULong(
const unsigned char* data, quint32 offset)
const;
109 inline quint64 getULLong(
const unsigned char* data, quint32 offset)
const;
110 inline quint16 getUShort(
const unsigned char* data, quint32 offset)
const;
111 inline int decryptByte(quint32 key2)
const;
112 inline void updateKeys(quint32* keys,
int c)
const;
113 inline void initKeys(
const QString& pwd, quint32* keys)
const;
115 inline QDateTime convertDateTime(
const unsigned char date[2],
const unsigned char time[2])
const;
118 void deviceDestroyed(QObject*);
122 quint32& myCRC, QIODevice* outDev, UnZip::ExtractionOptions options);
124 quint32& myCRC, QIODevice* outDev, UnZip::ExtractionOptions options);
125 void do_closeArchive();
130 #endif // OSDAB_UNZIP_P__H
ErrorCode
Definition: unzip.h:53
Zip file compression.
Definition: zip.h:49
Definition: zipentry_p.h:47
Binary buffer.
Definition: pdbim.h:93