FFSM++  1.1.0
French Forest Sector Model ++
zip.cpp File Reference
#include "zip.h"
#include "zip_p.h"
#include "zipentry_p.h"
#include <time.h>
#include <QMap>
#include <QString>
#include <QStringList>
#include <QDir>
#include <QFile>
#include <QDateTime>
#include <QCoreApplication>
#include <QtDebug>
Include dependency graph for zip.cpp:

Go to the source code of this file.

Macros

#define ZIP_LOCAL_HEADER_SIZE   30
 Local header size (including signature, excluding variable length fields) More...
 
#define ZIP_LOCAL_ENC_HEADER_SIZE   12
 Encryption header size. More...
 
#define ZIP_DD_SIZE_WS   16
 Data descriptor size (signature included) More...
 
#define ZIP_CD_SIZE   46
 Central Directory record size (signature included) More...
 
#define ZIP_EOCD_SIZE   22
 End of Central Directory record size (signature included) More...
 
#define ZIP_LH_OFF_VERS   4
 
#define ZIP_LH_OFF_GPFLAG   6
 
#define ZIP_LH_OFF_CMET   8
 
#define ZIP_LH_OFF_MODT   10
 
#define ZIP_LH_OFF_MODD   12
 
#define ZIP_LH_OFF_CRC   14
 
#define ZIP_LH_OFF_CSIZE   18
 
#define ZIP_LH_OFF_USIZE   22
 
#define ZIP_LH_OFF_NAMELEN   26
 
#define ZIP_LH_OFF_XLEN   28
 
#define ZIP_DD_OFF_CRC32   4
 
#define ZIP_DD_OFF_CSIZE   8
 
#define ZIP_DD_OFF_USIZE   12
 
#define ZIP_CD_OFF_MADEBY   4
 
#define ZIP_CD_OFF_VERSION   6
 
#define ZIP_CD_OFF_GPFLAG   8
 
#define ZIP_CD_OFF_CMET   10
 
#define ZIP_CD_OFF_MODT   12
 
#define ZIP_CD_OFF_MODD   14
 
#define ZIP_CD_OFF_CRC   16
 
#define ZIP_CD_OFF_CSIZE   20
 
#define ZIP_CD_OFF_USIZE   24
 
#define ZIP_CD_OFF_NAMELEN   28
 
#define ZIP_CD_OFF_XLEN   30
 
#define ZIP_CD_OFF_COMMLEN   32
 
#define ZIP_CD_OFF_DISKSTART   34
 
#define ZIP_CD_OFF_IATTR   36
 
#define ZIP_CD_OFF_EATTR   38
 
#define ZIP_CD_OFF_LHOFF   42
 
#define ZIP_EOCD_OFF_DISKNUM   4
 
#define ZIP_EOCD_OFF_CDDISKNUM   6
 
#define ZIP_EOCD_OFF_ENTRIES   8
 
#define ZIP_EOCD_OFF_CDENTRIES   10
 
#define ZIP_EOCD_OFF_CDSIZE   12
 
#define ZIP_EOCD_OFF_CDOFF   16
 
#define ZIP_EOCD_OFF_COMMLEN   20
 
#define ZIP_VERSION   0x14
 PKZip version for archives created by this API. More...
 
#define ZIP_COMPRESSION_THRESHOLD   60
 Do not store very small files as the compression headers overhead would be to big. More...
 
#define CRC32(c, b)   crcTable[((int)c^b) & 0xff] ^ (c >> 8)
 This macro updates a one-char-only CRC; it's the Info-Zip macro re-adapted. More...
 

Macro Definition Documentation

#define CRC32 (   c,
 
)    crcTable[((int)c^b) & 0xff] ^ (c >> 8)

This macro updates a one-char-only CRC; it's the Info-Zip macro re-adapted.

Definition at line 108 of file zip.cpp.

Referenced by ZipPrivate::updateKeys().

#define ZIP_CD_OFF_CMET   10

Definition at line 78 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_COMMLEN   32

Definition at line 86 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_CRC   16

Definition at line 81 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_CSIZE   20

Definition at line 82 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_DISKSTART   34

Definition at line 87 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_EATTR   38

Definition at line 89 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_GPFLAG   8

Definition at line 77 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_IATTR   36

Definition at line 88 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_LHOFF   42

Definition at line 90 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_MADEBY   4

Definition at line 75 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_MODD   14

Definition at line 80 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_MODT   12

Definition at line 79 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_NAMELEN   28

Definition at line 84 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_USIZE   24

Definition at line 83 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_VERSION   6

Definition at line 76 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_OFF_XLEN   30

Definition at line 85 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_CD_SIZE   46

Central Directory record size (signature included)

Definition at line 53 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_COMPRESSION_THRESHOLD   60

Do not store very small files as the compression headers overhead would be to big.

Definition at line 105 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_DD_OFF_CRC32   4

Definition at line 70 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_DD_OFF_CSIZE   8

Definition at line 71 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_DD_OFF_USIZE   12

Definition at line 72 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_DD_SIZE_WS   16

Data descriptor size (signature included)

Definition at line 51 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_EOCD_OFF_CDDISKNUM   6

Definition at line 94 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_EOCD_OFF_CDENTRIES   10

Definition at line 96 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_EOCD_OFF_CDOFF   16

Definition at line 98 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_EOCD_OFF_CDSIZE   12

Definition at line 97 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_EOCD_OFF_COMMLEN   20

Definition at line 99 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_EOCD_OFF_DISKNUM   4

Definition at line 93 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_EOCD_OFF_ENTRIES   8

Definition at line 95 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_EOCD_SIZE   22

End of Central Directory record size (signature included)

Definition at line 55 of file zip.cpp.

Referenced by ZipPrivate::closeArchive().

#define ZIP_LH_OFF_CMET   8

Definition at line 60 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_LH_OFF_CRC   14

Definition at line 63 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_LH_OFF_CSIZE   18

Definition at line 64 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_LH_OFF_GPFLAG   6

Definition at line 59 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_LH_OFF_MODD   12

Definition at line 62 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_LH_OFF_MODT   10

Definition at line 61 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_LH_OFF_NAMELEN   26

Definition at line 66 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_LH_OFF_USIZE   22

Definition at line 65 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_LH_OFF_VERS   4

Definition at line 58 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_LH_OFF_XLEN   28

Definition at line 67 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_LOCAL_ENC_HEADER_SIZE   12

Encryption header size.

Definition at line 49 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_LOCAL_HEADER_SIZE   30

Local header size (including signature, excluding variable length fields)

Definition at line 47 of file zip.cpp.

Referenced by ZipPrivate::createEntry().

#define ZIP_VERSION   0x14

PKZip version for archives created by this API.

Definition at line 102 of file zip.cpp.

Referenced by ZipPrivate::closeArchive(), and ZipPrivate::createEntry().