Click here to Skip to main content
15,881,819 members
Articles / Programming Languages / C++
Article

C++ wrapper for Gilles Vollant's Unzip API

Rate me:
Please Sign up or sign in to vote.
4.84/5 (24 votes)
10 Dec 2002Eclipse1 min read 220.8K   4.9K   62   42
Presents an extended yet simplified interface to querying, filtering and extracting multiple files from a zip archive

Sample Image - unzip.jpg

Introduction

I've been trawling the web for ages trying to find some zip extraction code which

  1. I could understand and
  2. did not have excessive restrictions.

Then I stumbled across Gilles Vollant's excellent work on providing a multi-file API to the ZLib code base written by Jean-loup Gailly and Mark Adler.

That was yesterday. A day later I had wrapped Gilles' code in a simplified C++ wrapper with extended features.

I don't want to gush too much, but having spent the last six months looking for code such as his, I was very impressed by how simply I could understand it and work with it.

The features I've added include:

  • Navigating/extracting the embedded files/folders by index
  • Navigating/extracting the embedded files by file extension
  • Extracting the embedded files whilst ignoring the path info stored with each file. i.e., flattening the file structure

The purpose of this release is mostly to assist people like me who were looking for some code to start with. If I come up with any useful extensions then I will update the code, but feel free (as I know you will) to criticize the code in anyway you like.

p.s. The sample app which comes with the code will show how to use it.

p.s to p.s. Although the sample app is MFC, the wrapper class is pure Win32.

License

This article, along with any associated source code and files, is licensed under The Eclipse Public License 1.0


Written By
Software Developer Maptek
Australia Australia
.dan.g. is a naturalised Australian and has been developing commercial windows software since 1998.

Comments and Discussions

 
AnswerRe: Buffering? Pin
.dan.g.26-May-03 15:12
professional.dan.g.26-May-03 15:12 
GeneralSwitching to C Pin
darkchrono22-Apr-03 15:43
darkchrono22-Apr-03 15:43 
GeneralRe: Switching to C Pin
.dan.g.22-Apr-03 16:00
professional.dan.g.22-Apr-03 16:00 
GeneralRe: Switching to C Pin
darkchrono22-Apr-03 16:17
darkchrono22-Apr-03 16:17 
GeneralRe: Switching to C Pin
.dan.g.22-Apr-03 17:49
professional.dan.g.22-Apr-03 17:49 
GeneralRe: Switching to C Pin
darkchrono22-Apr-03 17:53
darkchrono22-Apr-03 17:53 
GeneralRe: Switching to C Pin
.dan.g.22-Apr-03 18:14
professional.dan.g.22-Apr-03 18:14 
Questionconst UINT BUFFERSIZE = 20480 ?? Pin
alnite30-Mar-03 14:42
alnite30-Mar-03 14:42 
AnswerRe: const UINT BUFFERSIZE = 20480 ?? Pin
.dan.g.1-Apr-03 16:33
professional.dan.g.1-Apr-03 16:33 
GeneralZipper Wrapper Pin
tbcarver13-Mar-03 12:27
tbcarver13-Mar-03 12:27 
GeneralRe: Zipper Wrapper Pin
.dan.g.13-Mar-03 18:49
professional.dan.g.13-Mar-03 18:49 
Generalexclude libs Pin
Beer11-Jan-03 18:21
Beer11-Jan-03 18:21 
GeneralFeedback Pin
Larry Antram10-Dec-02 21:44
Larry Antram10-Dec-02 21:44 
GeneralRe: Feedback Pin
.dan.g.10-Dec-02 22:35
professional.dan.g.10-Dec-02 22:35 
GeneralRe: Feedback Pin
Uwe Keim11-Dec-02 19:53
sitebuilderUwe Keim11-Dec-02 19:53 
GeneralRe: Feedback Pin
Andreas Saurwein12-Dec-02 9:12
Andreas Saurwein12-Dec-02 9:12 
GeneralRe: Feedback Pin
Andreas Saurwein11-Dec-02 1:25
Andreas Saurwein11-Dec-02 1:25 
GeneralRe: Feedback Pin
Matthias Mann12-Dec-02 2:28
Matthias Mann12-Dec-02 2:28 
GeneralRe: Feedback Pin
Andreas Saurwein12-Dec-02 9:10
Andreas Saurwein12-Dec-02 9:10 
GeneralGood But... Pin
bruno leclerc10-Dec-02 21:03
bruno leclerc10-Dec-02 21:03 
GeneralRe: Good But... Pin
Luca Piccarreta10-Dec-02 22:18
Luca Piccarreta10-Dec-02 22:18 
GeneralRe: Good But... Pin
.dan.g.10-Dec-02 22:38
professional.dan.g.10-Dec-02 22:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.