qt5base-lts/tests/auto
Marc Mutz 2fd990b386 Port qCompress() to zstream/deflate()
The zlib convenience API we've been using so far has two problems:

- On Windows-64, where sizeof(long) == 4, the use of ulong for sizes
  meant that we could not compress data compressable on other 64-bit
  platforms (Unix). While zstream also uses ulong, being a stream API,
  it allows feeding data in chunks. The total_in and total_out members
  are only required for gzip compression and are otherwise just
  informational. They're unsigned, so their overflow does not cause
  UB. In summary, using zstream + deflate() allows us to compress more
  than 4GiB of data even on Windows-64.

- On all platforms, we always allocated the output buffer in such a
  way as to accommodate the pathological case of random, incompressible
  data, so the output buffer was larger than the input. Using zstream
  + deflate(), we can start with a smaller buffer, then let zlib pick
  up where it left off when it ran out of output buffer space, saving
  memory in the common case that compression meaningfully reduces the
  size. To avoid the first few rounds of reallocations, we continue to
  use zlib's compressBound() for input less than 256KiB.

This completely fixes the compression side of QTBUG-106542 and
QTBUG-104972.

Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-104972
Fixes: QTBUG-106542
Change-Id: Ia7e6c38403906b35462480fd611b482f05a5c59c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-10-17 23:33:41 +02:00
..
bic/data Add BiC data for the new way to do BiC testing 2022-05-12 13:33:41 +03:00
cmake CMake: Set RPATH of deployed plugins on Linux 2022-10-15 13:00:04 +02:00
concurrent Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
corelib Port qCompress() to zstream/deflate() 2022-10-17 23:33:41 +02:00
dbus Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
gui tests: skip tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad() on Wayland 2022-10-14 17:18:53 +02:00
guiapplauncher
network Autotest/Unix: request zero-sized core dumps for crashing code 2022-10-14 08:18:53 -07:00
opengl
other Long live Q_UNREACHABLE_RETURN()! 2022-10-15 22:11:47 +02:00
printsupport Port from qAsConst() to std::as_const() 2022-10-11 23:17:18 +02:00
shared Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
sql SQL/tests: fix tst_qsqlquery 2022-10-16 06:05:34 +02:00
testlib Update Catch2 to v2.13.10 2022-10-17 14:07:43 +02:00
tools Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
wasm Fix QWasmWindowStack::topWindow when the stack is empty 2022-09-12 20:09:03 +02:00
widgets tests: skip tst_QWidget::touchEventSynthesizedMouseEvent() on Wayland 2022-10-14 17:18:53 +02:00
xml Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00