Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
ZipPrivate Class Reference

#include <zip_p.h>

Inheritance diagram for ZipPrivate:
[legend]
Collaboration diagram for ZipPrivate:
[legend]

Public Types

typedef uLongf crc_t

Public Member Functions

 ZipPrivate ()
virtual ~ZipPrivate ()
Zip::ErrorCode createArchive (QIODevice *device)
Zip::ErrorCode closeArchive ()
void reset ()
bool zLibInit ()
bool containsEntry (const QFileInfo &info) const
Zip::ErrorCode addDirectory (const QString &path, const QString &root, Zip::CompressionOptions options, Zip::CompressionLevel level, int hierarchyLevel, int *addedFiles=0)
Zip::ErrorCode addFiles (const QStringList &paths, const QString &root, Zip::CompressionOptions options, Zip::CompressionLevel level, int *addedFiles)
Zip::ErrorCode createEntry (const QFileInfo &file, const QString &root, Zip::CompressionLevel level)
Zip::CompressionLevel detectCompressionByMime (const QString &ext)
quint32 updateChecksum (const quint32 &crc, const quint32 &val) const
 Updates a one-char-only CRC; it's the Info-Zip macro re-adapted.
void encryptBytes (quint32 *keys, char *buffer, qint64 read)
void setULong (quint32 v, char *buffer, unsigned int offset)
void updateKeys (quint32 *keys, int c) const
void initKeys (quint32 *keys) const
int decryptByte (quint32 key2) const
QString extractRoot (const QString &p, Zip::CompressionOptions o)

Public Attributes

QMap< QString, ZipEntryP * > * headers
QIODevice * device
QFile * file
char buffer1 [ZIP_READ_BUFFER]
char buffer2 [ZIP_READ_BUFFER]
unsigned char * uBuffer
const crc_tcrcTable
QString comment
QString password

Private Slots

void deviceDestroyed (QObject *)

Private Member Functions

int compressionStrategy (const QString &path, QIODevice &file) const
Zip::ErrorCode deflateFile (const QFileInfo &fileInfo, quint32 &crc, qint64 &written, const Zip::CompressionLevel &level, quint32 **keys)
Zip::ErrorCode storeFile (const QString &path, QIODevice &file, quint32 &crc, qint64 &written, quint32 **keys)
Zip::ErrorCode compressFile (const QString &path, QIODevice &file, quint32 &crc, qint64 &written, const Zip::CompressionLevel &level, quint32 **keys)
Zip::ErrorCode do_closeArchive ()
Zip::ErrorCode writeEntry (const QString &fileName, const ZipEntryP *h, quint32 &szCentralDir)
Zip::ErrorCode writeCentralDir (quint32 offCentralDir, quint32 szCentralDir)

Member Typedef Documentation

◆ crc_t

typedef uLongf ZipPrivate::crc_t

Constructor & Destructor Documentation

◆ ZipPrivate()

ZipPrivate::ZipPrivate ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~ZipPrivate()

ZipPrivate::~ZipPrivate ( )
virtual
Here is the call graph for this function:

Member Function Documentation

◆ addDirectory()

Zip::ErrorCode ZipPrivate::addDirectory ( const QString & path,
const QString & root,
Zip::CompressionOptions options,
Zip::CompressionLevel level,
int hierarchyLevel,
int * addedFiles = 0 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addFiles()

Zip::ErrorCode ZipPrivate::addFiles ( const QStringList & paths,
const QString & root,
Zip::CompressionOptions options,
Zip::CompressionLevel level,
int * addedFiles )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ closeArchive()

Zip::ErrorCode ZipPrivate::closeArchive ( )

Closes the current archive and writes out pending data.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compressFile()

Zip::ErrorCode ZipPrivate::compressFile ( const QString & path,
QIODevice & file,
quint32 & crc,
qint64 & written,
const Zip::CompressionLevel & level,
quint32 ** keys )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compressionStrategy()

int ZipPrivate::compressionStrategy ( const QString & path,
QIODevice & file ) const
private
Here is the caller graph for this function:

◆ containsEntry()

bool ZipPrivate::containsEntry ( const QFileInfo & info) const

Returns true if an entry for info has already been added. Uses file size and lower case absolute path to compare entries.

Here is the caller graph for this function:

◆ createArchive()

Zip::ErrorCode ZipPrivate::createArchive ( QIODevice * device)
Here is the call graph for this function:

◆ createEntry()

Zip::ErrorCode ZipPrivate::createEntry ( const QFileInfo & file,
const QString & root,
Zip::CompressionLevel level )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decryptByte()

int ZipPrivate::decryptByte ( quint32 key2) const
inline
Here is the caller graph for this function:

◆ deflateFile()

Zip::ErrorCode ZipPrivate::deflateFile ( const QFileInfo & fileInfo,
quint32 & crc,
qint64 & written,
const Zip::CompressionLevel & level,
quint32 ** keys )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detectCompressionByMime()

Zip::CompressionLevel ZipPrivate::detectCompressionByMime ( const QString & ext)
Here is the caller graph for this function:

◆ deviceDestroyed

void ZipPrivate::deviceDestroyed ( QObject * )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_closeArchive()

Zip::ErrorCode ZipPrivate::do_closeArchive ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ encryptBytes()

void ZipPrivate::encryptBytes ( quint32 * keys,
char * buffer,
qint64 read )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ extractRoot()

QString ZipPrivate::extractRoot ( const QString & p,
Zip::CompressionOptions o )
inline
Here is the caller graph for this function:

◆ initKeys()

void ZipPrivate::initKeys ( quint32 * keys) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void ZipPrivate::reset ( )

◆ setULong()

void ZipPrivate::setULong ( quint32 v,
char * buffer,
unsigned int offset )
inline
Here is the caller graph for this function:

◆ storeFile()

Zip::ErrorCode ZipPrivate::storeFile ( const QString & path,
QIODevice & file,
quint32 & crc,
qint64 & written,
quint32 ** keys )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateChecksum()

quint32 ZipPrivate::updateChecksum ( const quint32 & crc,
const quint32 & val ) const
inline

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

Here is the caller graph for this function:

◆ updateKeys()

void ZipPrivate::updateKeys ( quint32 * keys,
int c ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeCentralDir()

Zip::ErrorCode ZipPrivate::writeCentralDir ( quint32 offCentralDir,
quint32 szCentralDir )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeEntry()

Zip::ErrorCode ZipPrivate::writeEntry ( const QString & fileName,
const ZipEntryP * h,
quint32 & szCentralDir )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zLibInit()

bool ZipPrivate::zLibInit ( )
Here is the call graph for this function:

Member Data Documentation

◆ buffer1

char ZipPrivate::buffer1[ZIP_READ_BUFFER]

◆ buffer2

char ZipPrivate::buffer2[ZIP_READ_BUFFER]

◆ comment

QString ZipPrivate::comment

◆ crcTable

const crc_t* ZipPrivate::crcTable

◆ device

QIODevice* ZipPrivate::device

◆ file

QFile* ZipPrivate::file

◆ headers

QMap<QString,ZipEntryP*>* ZipPrivate::headers

◆ password

QString ZipPrivate::password

◆ uBuffer

unsigned char* ZipPrivate::uBuffer

The documentation for this class was generated from the following files: