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. qUncompress problem
Qt 6.11 is out! See what's new in the release blog

qUncompress problem

Scheduled Pinned Locked Moved General and Desktop
quncompress zda
1 Posts 1 Posters 1.3k 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.
  • N Offline
    N Offline
    nguyeh
    wrote on last edited by nguyeh
    #1

    Hi,
    I get the strange error with qUncompress but I don't know what is problem with my configuration.
    Here is my code:

    #include <QCoreApplication>
    #include <QByteArray>
    #include <QFile>
    #include <QDebug>
    
    int main(int argc, char *argv[])
    {
        QCoreApplication a(argc, argv);
        QFile f("/user/XXXXXX/home/AgeRegression");
         if (f.exists())
              qDebug() << "File exists";
          else
              qDebug() << "Missing file";
        f.open(QIODevice::ReadOnly);
        QByteArray qb = f.readAll();
        qb = qUncompress(qb);
        qDebug()<<"Successfully";
        const char *qt_version = qVersion();
        qDebug()<< QString(qt_version);
        return a.exec();
    }
    

    The file AgeRegression you can download from here.
    And here is result:

    File exists
    qUncompress: Z_DATA_ERROR: Input data is corrupted
    Successfully
    "5.3.2"
    

    The interesting thing is the other people seems to don't have issues when they run it on MacOS or Ubuntu while mine is Fedora 19.
    Can someone see my problem and help me? Thank in advance.

    UPDATE: Now when I try with the file compressed by the file which was compressed by qCompress, I got the same issues.

    1 Reply Last reply
    0

    • Login

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