qUncompress problem
-
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.