Author Topic: unzipping files  (Read 4549 times)

Offline Matreju

  • Multiple posting newcomer
  • *
  • Posts: 12
unzipping files
« 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 ?

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Re: unzipping files
« Reply #1 on: July 09, 2006, 05:06:30 pm »
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.

Offline Matreju

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: unzipping files
« Reply #2 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.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5193
Re: unzipping files
« Reply #3 on: July 09, 2006, 05:18:57 pm »
maybe wxWidgets has api functions for this :
wxZipInputStream/wxZipOutputStream (check out the docs at www.wxwidgets.org)

Offline Matreju

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: unzipping files
« Reply #4 on: July 09, 2006, 05:21:41 pm »
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.

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: unzipping files
« Reply #5 on: July 09, 2006, 05:27:25 pm »
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.

Offline Matreju

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: unzipping files
« Reply #6 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.

Offline Charon

  • Multiple posting newcomer
  • *
  • Posts: 49
  • fnord
    • charon - where mental illness meets chronic nonsense
Re: unzipping files
« Reply #7 on: July 09, 2006, 07:39:42 pm »
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

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: unzipping files
« Reply #8 on: July 11, 2006, 08:26:28 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

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: unzipping files
« Reply #9 on: July 11, 2006, 09:44: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.