PDA

View Full Version : Extracting files from a zip file



Althor
10th March 2009, 14:32
Hi, I have to develop a program that extracts the files that are contained into a zip file.

I don´t want to add comments, explore the zip file or process the files contained into the zip file. I only want to extract the files to a directory of the file system.

I have read about zlib, minizip, quazip but I don´t know how to use them to extract files.

Can you help me?

Thanks in advance.
Regards.

skrzypu
11th March 2009, 08:13
Hi,
Do you think about 7-zip? You can use line command version and QProcess.
I think this is the easiest way.

7-zip is on LGPL so you can use it both in open and commercial projects.

Althor
11th March 2009, 08:17
Hi,

I can´t use external tools because my program could be used in systems that don´t have the most commons tools installted. Because of this I need to extract manually the files from the zip.

Regards.

ComaWhite
11th March 2009, 08:46
I know the KDE library has classes for this. But see if you can find some libraries that handle the minimum basic api access like bzip2 does but for zip

wysota
11th March 2009, 10:39
ZLIB will work fine for you. I'm sure there are examples on using it in its documentation. Qt links against zlib, so no additional dependencies will be required.