#include "unzip.h"
#include "unzip_p.h"
#include "zipentry_p.h"
#include <QString>
#include <QStringList>
#include <QDir>
#include <QFile>
#include <QCoreApplication>
#include <QtDebug>
Include dependency graph for unzip.cpp:
Go to the source code of this file.
Defines | |
#define | UNZIP_LOCAL_HEADER_SIZE 26 |
Local header size (excluding signature, excluding variable length fields). | |
#define | UNZIP_CD_ENTRY_SIZE_NS 42 |
Central Directory file entry size (excluding signature, excluding variable length fields). | |
#define | UNZIP_DD_SIZE 12 |
Data descriptor size (excluding signature). | |
#define | UNZIP_EOCD_SIZE 22 |
End Of Central Directory size (including signature, excluding variable length fields). | |
#define | UNZIP_LOCAL_ENC_HEADER_SIZE 12 |
Local header entry encryption header size. | |
#define | UNZIP_CD_OFF_VERSION 0 |
#define | UNZIP_CD_OFF_GPFLAG 4 |
#define | UNZIP_CD_OFF_CMETHOD 6 |
#define | UNZIP_CD_OFF_MODT 8 |
#define | UNZIP_CD_OFF_MODD 10 |
#define | UNZIP_CD_OFF_CRC32 12 |
#define | UNZIP_CD_OFF_CSIZE 16 |
#define | UNZIP_CD_OFF_USIZE 20 |
#define | UNZIP_CD_OFF_NAMELEN 24 |
#define | UNZIP_CD_OFF_XLEN 26 |
#define | UNZIP_CD_OFF_COMMLEN 28 |
#define | UNZIP_CD_OFF_LHOFFSET 38 |
#define | UNZIP_LH_OFF_VERSION 0 |
#define | UNZIP_LH_OFF_GPFLAG 2 |
#define | UNZIP_LH_OFF_CMETHOD 4 |
#define | UNZIP_LH_OFF_MODT 6 |
#define | UNZIP_LH_OFF_MODD 8 |
#define | UNZIP_LH_OFF_CRC32 10 |
#define | UNZIP_LH_OFF_CSIZE 14 |
#define | UNZIP_LH_OFF_USIZE 18 |
#define | UNZIP_LH_OFF_NAMELEN 22 |
#define | UNZIP_LH_OFF_XLEN 24 |
#define | UNZIP_DD_OFF_CRC32 0 |
#define | UNZIP_DD_OFF_CSIZE 4 |
#define | UNZIP_DD_OFF_USIZE 8 |
#define | UNZIP_EOCD_OFF_ENTRIES 6 |
#define | UNZIP_EOCD_OFF_CDOFF 12 |
#define | UNZIP_EOCD_OFF_COMMLEN 16 |
#define | UNZIP_VERSION 0x1B |
#define | UNZIP_VERSION_STRICT 0x14 |
Full compatibility granted until this version. | |
#define | CRC32(c, b) crcTable[((int)c^b) & 0xff] ^ (c >> 8) |
CRC32 routine. | |
#define | UNZIP_CHECK_FOR_VALID_DATA |
Checks if some file has been already extracted. |
#define CRC32 | ( | c, | |||
b | ) | crcTable[((int)c^b) & 0xff] ^ (c >> 8) |
CRC32 routine.
Definition at line 136 of file unzip.cpp.
Referenced by ZipPrivate::updateKeys(), and UnzipPrivate::updateKeys().
#define UNZIP_CD_ENTRY_SIZE_NS 42 |
Central Directory file entry size (excluding signature, excluding variable length fields).
Definition at line 81 of file unzip.cpp.
Referenced by UnzipPrivate::parseCentralDirectoryRecord().
#define UNZIP_CD_OFF_CMETHOD 6 |
#define UNZIP_CD_OFF_COMMLEN 28 |
Definition at line 100 of file unzip.cpp.
Referenced by UnzipPrivate::parseCentralDirectoryRecord().
#define UNZIP_CD_OFF_CRC32 12 |
#define UNZIP_CD_OFF_CSIZE 16 |
#define UNZIP_CD_OFF_GPFLAG 4 |
#define UNZIP_CD_OFF_LHOFFSET 38 |
Definition at line 101 of file unzip.cpp.
Referenced by UnzipPrivate::parseCentralDirectoryRecord().
#define UNZIP_CD_OFF_MODD 10 |
#define UNZIP_CD_OFF_MODT 8 |
#define UNZIP_CD_OFF_NAMELEN 24 |
#define UNZIP_CD_OFF_USIZE 20 |
#define UNZIP_CD_OFF_VERSION 0 |
#define UNZIP_CD_OFF_XLEN 26 |
#define UNZIP_CHECK_FOR_VALID_DATA |
Value:
{\ if (headers != 0)\ {\ qDebug() << "Corrupted zip archive. Some files might be extracted.";\ ec = headers->size() != 0 ? UnZip::PartiallyCorrupted : UnZip::Corrupted;\ break;\ }\ else\ {\ delete device;\ device = 0;\ qDebug() << "Corrupted or invalid zip archive";\ ec = UnZip::Corrupted;\ break;\ }\ }
Definition at line 139 of file unzip.cpp.
Referenced by UnzipPrivate::openArchive().
#define UNZIP_DD_OFF_CRC32 0 |
#define UNZIP_DD_OFF_CSIZE 4 |
#define UNZIP_DD_OFF_USIZE 8 |
#define UNZIP_DD_SIZE 12 |
Data descriptor size (excluding signature).
Definition at line 83 of file unzip.cpp.
Referenced by UnzipPrivate::parseLocalHeaderRecord().
#define UNZIP_EOCD_OFF_CDOFF 12 |
#define UNZIP_EOCD_OFF_COMMLEN 16 |
#define UNZIP_EOCD_OFF_ENTRIES 6 |
#define UNZIP_EOCD_SIZE 22 |
End Of Central Directory size (including signature, excluding variable length fields).
Definition at line 85 of file unzip.cpp.
Referenced by UnzipPrivate::seekToCentralDirectory().
#define UNZIP_LH_OFF_CMETHOD 4 |
#define UNZIP_LH_OFF_CRC32 10 |
#define UNZIP_LH_OFF_CSIZE 14 |
#define UNZIP_LH_OFF_GPFLAG 2 |
#define UNZIP_LH_OFF_MODD 8 |
#define UNZIP_LH_OFF_MODT 6 |
#define UNZIP_LH_OFF_NAMELEN 22 |
#define UNZIP_LH_OFF_USIZE 18 |
#define UNZIP_LH_OFF_XLEN 24 |
#define UNZIP_LOCAL_ENC_HEADER_SIZE 12 |
Local header entry encryption header size.
Definition at line 87 of file unzip.cpp.
Referenced by UnzipPrivate::extractFile().
#define UNZIP_LOCAL_HEADER_SIZE 26 |
Local header size (excluding signature, excluding variable length fields).
Definition at line 79 of file unzip.cpp.
Referenced by UnzipPrivate::parseLocalHeaderRecord().
#define UNZIP_VERSION 0x1B |
Max version handled by this API. 0x1B = 2.7 --> full compatibility only up to version 2.0 (0x14) versions from 2.1 to 2.7 may use unsupported compression methods versions after 2.7 may have an incompatible header format
Definition at line 131 of file unzip.cpp.
Referenced by UnzipPrivate::parseCentralDirectoryRecord().
#define UNZIP_VERSION_STRICT 0x14 |