How to unzip a zip file with qt fuction?
Is there a way to unzip a zip file with a qt fuction..? ( lets say the zip file has some songs in it )
I have heard about quncompress.. when i tried this:
- outfile.write(compressedData);
- infile.close();
- outfile.close();
an error like this appeared:
- qUncompress: Z_DATA_ERROR: Input data is corrupted
4 replies
The archives have typically some file management involved. That is not part of zlib.
Some useful information you may find here [qt-project.org]
How to compress data with Qt?Qt uses the zlib library to provide compression. This means that you can compress and decompress your bytearrays of data using Qt. See the documentation on qUncompress() [qt.nokia.com]
Note that this does not produce file archives that can be opened by other applications, to do that you will need to write it yourself using Qt’s custom file handling system [qt.nokia.com] or use a 3rd party library.
You must log in to post a reply. Not a member yet? Register here!



