News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

unzipping files

Started by Matreju, July 09, 2006, 04:20:37 PM

Previous topic - Next topic

Matreju

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 ?

ironhead

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.

Matreju

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.

killerbot

maybe wxWidgets has api functions for this :
wxZipInputStream/wxZipOutputStream (check out the docs at www.wxwidgets.org)

Matreju

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.

Game_Ender

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.

Matreju

*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.

Charon

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/
hi, i am a signature virus. please copy me into your sig!
Wish list : no root-node for workspaces, open files and symbols; world domination

Michael

Quote from: Matreju on July 09, 2006, 05:11:45 PM
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
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

Game_Ender

Quote from: Matreju on July 09, 2006, 05:36:27 PM
*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 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.