I have a zip file with many (about 4000) png in it.
There are no subfolders in the zip archive, and all the png files are in the root folder.

I need to open the zip file, search for a given png file and extract it.
I don't need to extract multiple files, or change the zip file.

Now I'm looking for a free zip library to do this.
Can someone help me?
Posted on 2004-02-02 08:23:30 by greenant
Posted on 2004-02-02 08:49:08 by Tola
zlib doesn't support zip archives.
I need to extract a file from an archive.
Zlib can compress/decompress only single files
Posted on 2004-02-02 09:09:33 by greenant
rip off infozip... http://www.info-zip.org/pub/infozip/ . I haven't checked their license, but it's probably better than GPL.
Posted on 2004-02-02 09:17:15 by f0dder

zlib doesn't support zip archives.
I need to extract a file from an archive.
Zlib can compress/decompress only single files

oops, my bad :stupid:

there's the ziparchive library
http://www.artpol-software.com/index_zip.html
(gnu gpl, not free for commercial use)
and a dll that uses it
http://filezilla.sourceforge.net/misc/ZipDLL.zip
Posted on 2004-02-02 09:21:59 by Tola
tola: it is a c++ dll. I have to use it in asm, so it should be c compatible
f0dder: I have arleady checked it, but I'm looking for something better/easier.

The licence should be GPL compatible because my program is covered by GPL
Posted on 2004-02-02 11:11:42 by greenant

tola: it is a c++ dll. I have to use it in asm, so it should be c compatible

i guess it actually is, never used it myself, though.
Posted on 2004-02-02 11:46:52 by Tola
GPL, ick - you madman.

As for 'easier'... getting a zip support library out of info-zip can't be more than a couple of hours of hacking around, can it?
Posted on 2004-02-02 13:28:00 by f0dder
My program is arleady GPL covered and I have to add it the zip support.

I will try info-zip
Posted on 2004-02-02 14:10:04 by greenant
Now I'm creating a c++ example to find out how unzip32.dll work.
It seems simple but is poorly documented
Posted on 2004-02-02 15:23:42 by greenant
It works also in masm :grin: :grin:
Thanks :alright:
Posted on 2004-02-02 16:19:47 by greenant
How come your program is GPL-covered?
Posted on 2004-02-02 16:42:56 by f0dder
I have already converted zlib library to masm.I have posted on algos section long ago.I guess KetilO uses it for his zip project addin.
Posted on 2004-02-02 19:52:13 by LaptoniC
Thanks LaptoniC,

I am using your zlibstat library in my project and I wasn't sure who to thank in the credits :)

IMHO zlib is the best library around for compression. Yes it does multiple items, yes it does zip format and the liscense is about as "do anything you like with it" as it can possibly get. At least none of that GPL garbage that limits what you can do with your application.
Posted on 2004-02-02 22:00:38 by donkey

How come your program is GPL-covered?

I don't understand


Info-zip licence is fully compatible with GPL licence since I distribuite only unzip32.dll along with my program

LaptoniC, can zLib exctract a single file from a zip archive?
Posted on 2004-02-03 03:00:39 by greenant
Greenant, I'm asking why your program is under GPL - because you have to, or because you like this filthy license?
Posted on 2004-02-03 05:42:41 by f0dder
greenant Yes.You can unpack single file from it.It is not so much userfriendly but it will work for you I guess.
Posted on 2004-02-03 06:16:26 by LaptoniC

Greenant, I'm asking why your program is under GPL - because you have to, or because you like this filthy license?

I like this license.

I think it is the best licence for me

I don't like Public Domain because I want the copyright of what I code
I dont' like shareware or commercial license because I want to keep free the code and the executable.

I prefer GPL over Freeware (or other similar things) because I think that anyone can improve my code and sell what he did, as long as he respect GPL
Posted on 2004-02-03 09:32:14 by greenant
Originally posted by greenant
I prefer GPL over Freeware (or other similar things) because I think that anyone can improve my code and sell what he did, as long as he respect GPL


Well, then, you should apply a LGPL license to your program, because GPL does not allow mixing GPL code with non-GPL code - I guess someone who sells some software does not want to reveal its sourcecode.
Posted on 2004-02-03 10:07:49 by Morris
I wonder how any sane programmer can like a license that takes away his rights :/
Posted on 2004-02-03 10:15:32 by f0dder