571 static const char *entryTypes[] = {
587 if (contents.
length() < 64)
606 len += (len >> 12) + (len >> 14) + 11;
617 qWarning(
"QZip: Z_MEM_ERROR: Not enough memory to compress file, skipping");
624 }
while (res == Z_BUF_ERROR);
628 uint crc_32 = ::crc32(0, 0, 0);
634 qWarning(
"QZip: Filename too long, chopping it to 65535 characters");
char * data()
Returns a pointer to the data stored in the byte array.
static int deflate(Bytef *dest, ulong *destLen, const Bytef *source, ulong sourceLen)
QByteArray toUtf8() const Q_REQUIRED_RESULT
Returns a UTF-8 representation of the string as a QByteArray.
The QByteArray class provides an array of bytes.
virtual qint64 pos() const
For random-access devices, this function returns the position that data is written to or read from...
void append(const T &t)
Inserts value at the end of the list.
bool isOpen() const
Returns true if the device is open; otherwise returns false.
QZipWriter::Status status
QFile::Permissions permissions
Q_CORE_EXPORT void qWarning(const char *,...)
static const char * data(const QByteArray &arr)
QByteArray left(int len) const
Returns a byte array that contains the leftmost len bytes of this byte array.
QByteArray toLocal8Bit() const Q_REQUIRED_RESULT
Returns the local 8-bit representation of the string as a QByteArray.
QList< FileHeader > fileHeaders
int length() const
Same as size().
const char * constData() const
Returns a pointer to the data stored in the byte array.
static void writeMSDosDate(uchar *dest, const QDateTime &dt)
QZipWriter::CompressionPolicy compressionPolicy
static void writeUShort(uchar *data, ushort i)
void resize(int size)
Sets the size of the byte array to size bytes.
static QDateTime currentDateTime()
Returns the current datetime, as reported by the system clock, in the local time zone.
int size() const
Returns the number of bytes in this byte array.
virtual bool open(OpenMode mode)
Opens the device and sets its OpenMode to mode.
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
static quint32 permissionsToMode(QFile::Permissions perms)
virtual bool seek(qint64 pos)
For random-access devices, this function sets the current position to pos, returning true on success...
static void writeUInt(uchar *data, uint i)