Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-106542

qCompress()/qUncompress() cannot handle more than 4GiB of data on Win64

    XMLWordPrintable

    Details

    • Platform/s:
      Windows
    • Epic Link:
    • Story Points:
      8
    • Commits:
      2fd990b386 (qt/qtbase/dev) 2fd990b386 (qt/tqtc-qtbase/dev) 93aa02e671 (qt/qtbase/6.4) 93aa02e671 (qt/tqtc-qtbase/6.4) 2a4d5b41cb (qt/tqtc-qtbase/6.2) 93aa02e671 (qt/tqtc-qtbase/6.4.1) 93aa02e671 (qt/tqtc-qtbase/tqtc/qtinsight-6.4)
    • Sprint:
      Foundation Sprint 65, Foundation Sprint 66, Foundation Sprint 67, Foundation Sprint 68

      Description

      While working on QTBUG-104972, which fixed the most obvious problems with the widening of the functions from 32-bit to 64-bit-sized Qt containers, it turned out that, due to the zlib API using ulong as the size type, 64-bit Windows is unable to handle > 4GiB of (decompressed) data, because sizeof(ulong) is 32-bit on Windows. 64-bit Unix is unaffected, as sizeof(ulong) == 8 there.

      To fix, instead of using the compress2() and uncompress() convenience functions, we can use zlib's the stream API (zstream/deflate()/inflate()) directly. Being a stream API, it should not be limited by the size of long.

      Acceptance criteria:

      1. qCompress() can compress more than 4GiB of data on Windows-64
      2. qUncompress() can uncompress more than 4GiB of data on Windows-64
      3. functional benchmark for the above two is 64-bit Unix (post QTBUG-104972)
      4. the documentation, updated as part of QTBUG-104972, is changed to reflect the removal of the Windows-64 limitation

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              mmutz Marc Mutz
              Reporter:
              mmutz Marc Mutz
              PM Owner:
              Vladimir Minenko Vladimir Minenko
              RnD Owner:
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: