Go to the documentation of this file.
39 #ifndef OSDAB_UNZIP_P_H
40 #define OSDAB_UNZIP_P_H
47 using keyset = std::array<quint32,3>;
51 #define UNZIP_READ_BUFFER (256*1024)
63 QMap<QString,ZipEntryP*>*
headers {
nullptr};
104 static inline quint32
getULong(
const unsigned char* data, quint32 offset) ;
105 static inline quint64
getULLong(
const unsigned char* data, quint32 offset) ;
106 static inline quint16
getUShort(
const unsigned char* data, quint32 offset) ;
111 static inline QDateTime
convertDateTime(std::array<uint8_t,2> date, std::array<uint8_t,2> time) ;
114 #endif // OSDAB_UNZIP_P_H
static quint16 getUShort(const unsigned char *data, quint32 offset)
def read(device=None, features=[])
std::array< quint32, 3 > keyset
bool createDirectory(const QString &path)
static quint64 getULLong(const unsigned char *data, quint32 offset)
static quint32 getULong(const unsigned char *data, quint32 offset)
void decryptBytes(keyset keys, char *buffer, qint64 read) const
#define UNZIP_READ_BUFFER
quint16 unsupportedEntryCount
UnZip::ErrorCode openArchive(QIODevice *device)
bool testKeys(const ZipEntryP &header, keyset keys)
UnZip::ErrorCode testPassword(keyset keys, const QString &file, const ZipEntryP &header)
void initKeys(const QString &pwd, keyset keys) const
static QDateTime convertDateTime(std::array< uint8_t, 2 > date, std::array< uint8_t, 2 > time)
UnZip::ErrorCode parseCentralDirectoryRecord()
UnZip::ErrorCode extractFile(const QString &path, ZipEntryP &entry, const QDir &dir, UnZip::ExtractionOptions options)
UnZip::ErrorCode parseLocalHeaderRecord(const QString &path, ZipEntryP &entry)
void updateKeys(keyset keys, int c) const
static int decryptByte(quint32 key2)
char buffer1[UNZIP_READ_BUFFER]
QMap< QString, ZipEntryP * > * headers
char buffer2[UNZIP_READ_BUFFER]
UnZip::ErrorCode seekToCentralDirectory()