Im using qUncompress
to unzip a file that was originally zipped in Mac OS X (right click -> compress)
My code looks like:
QString location = "/path/to/file/";
QFile infile(location + "file.zip");
QFile outfile(location + "file.app");
infile.open(QIODevice::ReadOnly);
outfile.open(QIODevice::WriteOnly);
QByteArray uncompressedData = infile.readAll();
QByteArray compressedData = qUncompress(uncompressedData);
outfile.write(compressedData);
infile.close();
outfile.close();
However I am getting this error:
qUncompress: Z_DATA_ERROR: Input data is corrupted
Any ideas what could be wrong?