Click here to Skip to main content
15,892,674 members
Articles / Desktop Programming / ATL

SAWZip - zip file manipulation control

Rate me:
Please Sign up or sign in to vote.
4.56/5 (6 votes)
29 Aug 2001 357.5K   5.4K   58  
An ATL based control for reading and writing zip files.
SAWZip
------

SAWZip is a control written with ATL in Visual C++ to read, create and modify 
zipfiles. You can use this control in Visual Basic, Visual C++ and any other
COM-aware programming language.

I wrote SAWZip because I needed a control or library to read jar-files in my 
JCB project. JCB is a small Java Class Browser written with WTL. When I search
the web for such a control or library I didn't find anything that satisfied me.
And when I did find something I had to pay for it. The best I found was the 
Zip library of Tadeusz Dracz. He used the zlib-compression library 
in a MFC project. I used this project as a start for SAWZip.

License
-------
You're free to use SAWZip in your projects    
          
For commercial programs : please add the following 
  copyright in your info :
		"(c) SAWZip Control created by S.A.W. - Franky Braem
		 www.braem17.yucom.be (frankysprog@yucom.be)"

As always: don't shoot the programmer when something goes wrong.

Updates
-------
27-12-2000	Version 1.0 Released.

03-01-2001	Changed the extraction-method.
			Changed the Name-property. Now it returns the name 
			with \ instead of /.

04-03-2001	Version 1.1
			Added ModificationDate property to the File-object.
			Added methods to extract to a string or a stream.

16-04-2001	Version 1.2
			Resolves bugs in AddFileByName. 
			(Thanks to Shane Warren).
			
30-04-2001	Version 1.3 
			Added a property for testing on Readonly files. 
			Now it is possible to uncompress files from a readonly zip-file.

15-05-2001	Version 1.4 
			Resolved a memory-leak after extracting a file 
			(Thanks to Brad Gutilla).

07-06-2001	Version 1.5 
			Bug resolved in the UNICODE version. 
			Filenames were stored only with the first character.

25-06-2001	Version 1.6 
			Bug resolved in the extract-method. 
			When fullpath was true and the directory didn't exist 
			a "Can't create file" occured. 
			Now the fullpath is created before extracting. 
			(Thanks Nat Dickinson)

11-08-2001	Version 2.0
			Solved the comment-bug on the archive-object.
			Compatible for Win95-users.
			(Thanks to Frederic St-Laurent)

Send bugs, suggestions to frankysprog@yucom.be
Check for new updates at www.braem17.yucom.be

Installation
------------
Extract all files in a directory and run the following program:

Regsvr32.exe <dir>\SAWZip.dll
<dir> is the directory you used to extract SAWZip.

This control uses the dll-version of the zlib-compression library. 
When you install this control the zlib.dll must be reachable. The zlib.dll is 
provided in the download.

Versions
--------
SAWZip has a normal version for Win95,98,NT and a UNICODE-version for NT.
Note that the UNICODE-version is not tested as much as the normal version.

Thanks to
---------
Tadeusz Dracz - for his wonderful library 
				(see http://www.codeproject.com/cpp/zip.asp).
Brad Gutilla - for solving a memory-leak.
Frederic St-Laurent - for making SAWZip Win95 compatible.
Jean-loup Gailly and Mark Adler - for their zlib-compression library.

S.A.W
-----
S.A.W. means Software At Work and it's derived from the 80's band Men At Work.
I'm still a fan of them. Their lead-singer Colin Hay makes great
music. (www.colinhay.com)
I use these initials to make sure that my project has a unique name. 

Franky Braem

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Belgium Belgium
Programmer since 1991 using C/C++/Visual Basic and Java. Playing with wxWindows at home.

Comments and Discussions