Guy Levasseur
L'Entreprise Industrielle (SRI) Tel: (001133)-1-0145182098
86 bis Quai Blanqui Fax: (001133)-1-0145182099
94146 ALFORTVILLE Email: glev...@iplus.fr
FRANCE
gg wrote:
>
> where i found the "pkzip" or "zip" source code
> sory for my english i'm frogy !!
PKWare has not made their source code available for public scrunity.
Fortunately, you have a couple of other choices. First, visit the
Info-Zip home page and take a look at the C source for Zip and UnZip:
http://www.cdrom.com/pub/infozip/
These two programs are extremely portable among different platforms and
compilers. However, the current releases of Zip and UnZip were not
written to be library components, they are stand alone applications, so
hoisting their code into your own app is not a trivial task.
If you like Java better than C, JDK 1.1. includes a ZipFile class that
can be used to manipulate Zip 2.x format archive files. The code is far
from bulletproof, it's pretty easy to create an invalid Zip file, so be
careful and double check your work. But it is built to be a library
component, and as such is pretty easy to work with. As of today, the 1.1
JDK is at:
http://www.javasoft.com:80/products/jdk/1.1/index.html
If you want to roll your own program from scratch, you need two things.
First, you need to be able to read and write the Zip directory
structure. Second, you need to be able to compress and expand using the
deflate algorithm.
Reading and writing the Zip directory structure is not too hard,
especially if you don't try to support some of the more esoteric
options, such as encryption or disk spanning. (A product I wrote for
Greenleaf Software (http://www.gleaf.com) called ArchiveLib is a C++
library that does just that.)
Recreating the deflate algorithm is considerably more difficult. To
avoid too much work, you can drop in the zlib package as your
compressor. The zlib source and more info lives at:
http://www.cdrom.com/pub/infozip/zlib/
It is incredibly portable, and plugs into C/C++ programs quite easily.
----------------------------------------------------
Mark Nelson - ma...@tiny.com
Addisoft Consulting - http://www.addisoft.com
Offering advanced ActiveX Courses this fall!
Personal - http://web2.airmail.net/markn
gg wrote:
>
> where i found the "pkzip" or "zip" source code
> sory for my english i'm frogy !!
> --
>
> Guy Levasseur
> L'Entreprise Industrielle (SRI) Tel: (001133)-1-0145182098
> 86 bis Quai Blanqui Fax: (001133)-1-0145182099
> 94146 ALFORTVILLE Email: glev...@iplus.fr
> FRANCE
PKZIP the small nice company will tell you about their file format on
their web site. It is asking too much for the source code.
--
Rob.
#:^) mailto://bo...@forsee.tcp.co.uk/
Please:
NO SPAM
NO JUNK E-MAIL
or I will have to do something annoying.
PKWare's PKZip is crippleware. It doesn't come with source code (though
I believe that you can license it).
A much better program is InfoZip's package. (InfoZip is a collection of
programmers linked by the Internet who are dedicated to maintaining freely
distributed, zip-compatible tools).
Do a web search for infozip. They have a home page.
--
"In My Egotistical Opinion, most people's C programs should be
indented six feet downward and covered with dirt."
-- Blair P. Houghton
>where i found the "pkzip" or "zip" source code
>sory for my english i'm frogy !!
Check the InfoZIP Homepage at
http://www.cdrom.com/pub/infozip/
CYa
Haiko