Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: Matreju on July 09, 2006, 04:20:37 pm
-
Which libraries are needed for unzipping files on windows with mingw ? I have found zlib and compiled. But it seems to be for gzip files. Not for zip. Or do i make mistakes ?
-
There are many programs that will extract gzipped files, including winzip, 7-zip and many others. If you are looking for a command line utility you could try gunzip.
-
No..I dont search a command line utility. I need it for developing in C/C++. A library or something.
Automatic opening and searching zipped datafiles. Extracting the files if data in file hits. A kind of fast precollecor in a processchain.
-
maybe wxWidgets has api functions for this :
wxZipInputStream/wxZipOutputStream (check out the docs at www.wxwidgets.org)
-
I see . My question seemed no to be stupid. Its an server application. Didnt i have an big overhead wenn i link against wxwidget ? But i will try this way.
-
Zlib can handle both zip and gzip files, but the library only handles files, not archives. If you want to be able to use zlib to handle archives you need to use minizip in the contrib/minizip folder in the zlib distribution. It comes with 2 example programs minizip, and miniunz.
Don't use wxWidgets here if you have to, it would be way to big for a server.
-
*grmpf* There is no distri and no mini in my zlib 1.2.3 archive. But i have downloaded it from the zlib website and compiled.
-
you could give physfs a chance too.
its pretty easy to open zip-files with it, although this is not its only purpose to exist.
(actually it implements a virtual filesystem, but this way it gives you the added bonus to enumerate files in a subfolder inside a zip-file and so on)
http://icculus.org/physfs/ (http://icculus.org/physfs/)
-
No..I dont search a command line utility. I need it for developing in C/C++. A library or something.
Automatic opening and searching zipped datafiles. Extracting the files if data in file hits. A kind of fast precollecor in a processchain.
Hello,
May be this could be of some interest:
http://www.7-zip.org/sdk.html
Best wishes,
Michael
-
*grmpf* There is no distri and no mini in my zlib 1.2.3 archive. But i have downloaded it from the zlib website and compiled.
I just downloaded the one from the site and it is there. Use this (http://www.zlib.net/zlib-1.2.3.tar.gz) link. Unpack it and you go into the the zlib-1.2.3/contrib/minizip folder. Have a look at the minizip.c/.h and miniunz.c/.h.