Handle data larger than 2 Gb for compression/decompression


In the compress() method, simply use qsizetype when retrieving
the input data and modifying the data pointer. The rest is already
handled, because the compression is done in 8Kb blocks.

The decompress() function, however, was assuming that the input
data can be fully submitted into the z_stream struct. That is not
the case in practice, because the z_stream.avail_in parameter is
of type uInt (unsigned 32-bit integer). As a result, we need to
make sure that we split the input data into chunks than are
suitable for the z_stream struct. This results in introducing
an outer while() loop + some size/offset manipulation.

Task-number: QTBUG-139963
Change-Id: I0c544bd712d3b0726a1f557bbcd238f17adde948
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
commitfe79079257d36248a20e0c53b315d8f89bb71114
parent328a4beb37cc44b3cb481783ef327c37490d323f
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeWed, 22 Oct 2025 16:59:36 +0200