View Full Version : Compression in QT

17th October 2010, 18:05
I m new to QT world. Can anyone help me to point correct link which will help me to implement Compression of text file using QT.
Any help would be appreciated.

Thanks in advance.

17th October 2010, 18:12
It is Qt and if you are new, our Newbie section is just fine!

See qCompress() or have a look at e. g. QuaZip.

17th October 2010, 18:18
Is there any specific algorithm you would like to use?

8th October 2012, 14:18
I know this thread is quite old, but I actually have the same question.

I'm looking for a compression library for C++/QT. It should not be a project, but open source or just a C++ Reference?
I'm also looking for some "special" options like:
- the method receives just a file name or a list of file names (e.g. hold in a QWidgetList or a vector)
- the compression should not last hundreds of years ;)
- there should be a compression into files like .zip, .rar. ..

I just want to use a method, not a class or a whole project.
I read about QuaZIP, zlib or qCompress/qUncompress... but what would be the best for my impression?
Edit: I ment, did someone have any experiences?

8th October 2012, 14:58
qCompress can only compress a single entity at once so if you are looking for a solution that doesn't require you to write any additional code, start with QuaZIP or call appropriate standalone compressors (tar, bzip2, zip, etc.) through QProcess.

8th October 2012, 15:19
Thanks for that, I'm going to think about it.
A question aside: Can QuaZIP compress both, files and folders?

8th October 2012, 16:17
You can't compress "folders", a folder is just a name. You can only compress files in folders. If you mean whether QuaZIP can do recursive compression then AFAIR it can.