40 #ifndef DECOMPRESS_HELPER_P_H
41 #define DECOMPRESS_HELPER_P_H
54 #include <QtNetwork/private/qtnetworkglobal_p.h>
55 #include <QtCore/private/qbytedata_p.h>
76 bool setEncoding(
const QByteArray &contentEncoding);
78 bool isCountingBytes()
const;
79 void setCountingBytesEnabled(
bool shouldCount);
81 qint64 uncompressedSize()
const;
94 void setDecompressedSafetyCheckThreshold(
qint64 threshold);
96 static bool isSupportedEncoding(
const QByteArray &encoding);
102 bool isPotentialArchiveBomb()
const;
103 bool hasDataInternal()
const;
106 bool countInternal();
111 qint64 encodedBytesAvailable()
const;
119 const qsizetype MaxDecompressedDataBufferSize = 10 * 1024 * 1024;
120 bool decoderHasData =
false;
122 bool countDecompressed =
false;
123 std::unique_ptr<QDecompressHelper> countHelper;
128 qint64 archiveBombCheckThreshold = 10 * 1024 * 1024;
129 qint64 totalUncompressedBytes = 0;
130 qint64 totalCompressedBytes = 0;
131 qint64 totalBytesRead = 0;
135 void *decoderPointer =
nullptr;
136 #if QT_CONFIG(brotli)
137 const uint8_t *brotliUnconsumedDataPtr =
nullptr;
138 size_t brotliUnconsumedAmount = 0;
The QByteArray class provides an array of bytes.
The QByteArrayList class provides a list of byte arrays.
QDecompressHelper()=default
The QIODevice class is the base interface class of all I/O devices in Qt.
The QString class provides a Unicode character string.
#define Q_AUTOTEST_EXPORT
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data