39 #ifndef OSDAB_ZIP_P__H
40 #define OSDAB_ZIP_P__H
43 #include "zipentry_p.h"
45 #include <QtCore/QFileInfo>
46 #include <QtCore/QObject>
47 #include <QtCore/QtGlobal>
56 #define ZIP_READ_BUFFER (256*1024)
58 OSDAB_BEGIN_NAMESPACE(
Zip)
65 typedef z_crc_t crc_t;
69 QMap<QString,ZipEntryP*>* headers;
74 char buffer1[ZIP_READ_BUFFER];
75 char buffer2[ZIP_READ_BUFFER];
77 unsigned char* uBuffer;
79 const crc_t* crcTable;
90 bool containsEntry(
const QFileInfo& info)
const;
92 Zip::ErrorCode addDirectory(
const QString& path,
const QString& root,
94 int hierarchyLevel,
int* addedFiles = 0);
95 Zip::ErrorCode addFiles(
const QStringList& paths,
const QString& root,
99 Zip::ErrorCode createEntry(
const QFileInfo& file,
const QString& root,
103 inline quint32 updateChecksum(
const quint32& crc,
const quint32& val)
const;
105 inline void encryptBytes(quint32* keys,
char*
buffer, qint64 read);
107 inline void setULong(quint32 v,
char* buffer,
unsigned int offset);
108 inline void updateKeys(quint32* keys,
int c)
const;
109 inline void initKeys(quint32* keys)
const;
110 inline int decryptByte(quint32 key2)
const;
112 inline QString extractRoot(
const QString& p, Zip::CompressionOptions o);
115 void deviceDestroyed(QObject*);
118 int compressionStrategy(
const QString& path, QIODevice& file)
const;
122 quint32& crc, qint64& written, quint32** keys);
127 Zip::ErrorCode writeCentralDir(quint32 offCentralDir, quint32 szCentralDir);
132 #endif // OSDAB_ZIP_P__H
CompressionLevel
Definition: zip.h:67
Zip file compression.
Definition: zip.h:49
Definition: zipentry_p.h:47
ErrorCode
Definition: zip.h:52
Binary buffer.
Definition: pdbim.h:93