Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QByteArray qUncompress on non-Qt apps
Forum Updated to NodeBB v4.3 + New Features

QByteArray qUncompress on non-Qt apps

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 256 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jeevo
    wrote on last edited by
    #1

    I have a webservice running on Qt and in it there's a method returning a compressed file (using the QByteArray qCompress with level 9). Now I am trying to get to decompress it in another mobile application (not Qt) that's connecting to this WS, but I have no idea which algorithm to use. I've tried using zlib, regular base64, gunzip, etc... and all my attempts have not yielded results so far. What is the right algorithm to use? Has anyone experienced anything that could help me?

    JonBJ 1 Reply Last reply
    0
    • J Jeevo

      I have a webservice running on Qt and in it there's a method returning a compressed file (using the QByteArray qCompress with level 9). Now I am trying to get to decompress it in another mobile application (not Qt) that's connecting to this WS, but I have no idea which algorithm to use. I've tried using zlib, regular base64, gunzip, etc... and all my attempts have not yielded results so far. What is the right algorithm to use? Has anyone experienced anything that could help me?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Jeevo
      I believe qCompress simply wraps zlib calls. You could verify in the sources of your Qt version.

      J 1 Reply Last reply
      1
      • JonBJ JonB

        @Jeevo
        I believe qCompress simply wraps zlib calls. You could verify in the sources of your Qt version.

        J Offline
        J Offline
        Jeevo
        wrote on last edited by
        #3

        @JonB Haven't thought about that. Looking at the code it seems to use zlibs compress2. I will see if I can decompress that now, thank you Jon.

        Christian EhrlicherC 1 Reply Last reply
        1
        • J Jeevo

          @JonB Haven't thought about that. Looking at the code it seems to use zlibs compress2. I will see if I can decompress that now, thank you Jon.

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Jeevo It's properly documented: https://doc.qt.io/qt-6/qbytearray.html#qCompress and https://doc.qt.io/qt-6/qbytearray.html#qUncompress-1

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved