Ariel
Ariel

Reputation: 23

C library to read from zip archives

Is there a portable C library to access .zip archives? "gzip" or "zlib" (the closest I could find) only handle compressed data, I need to be able to list the files inside the archive, and access each one individually, and if they're compressed using the 'deflate' method, I can use zlib on it.

Upvotes: 2

Views: 613

Answers (3)

d.popov
d.popov

Reputation: 4255

7-zip has a complete SDK, with example sources, and a lot of functionality.

take a look here

Upvotes: 0

Todd V. Rovito
Todd V. Rovito

Reputation: 115

The zip that comes with Linux and BSD is actually called info-ZIP which is here. Personally I have not tried such a thing but the info-zip front page states "Info-ZIP's primary compression engine has also been spun off into the free zlib compression library", so you might want to check out zlib. The zlib page has a FAQ with a answer to your specific question. I would start by studying how info-zip works. Good luck.

Upvotes: 1

Krumelur
Krumelur

Reputation: 32497

Minizip, maybe?

http://www.winimage.com/zLibDll/minizip.html

Upvotes: 1

Related Questions