tars and zips

Bob Purvy bpurvy at packeteer.com
Fri Apr 13 00:01:19 EDT 2001


thanks to everyone who responded, and you're right -- zlib is
(de)compression only, which I don't much need.  Hard disk space we've got.

On the other hand, flash disk space (where our image lives) is at a premium,
so I do begrudge the space for zlib (or gnu tar, which someone else
suggested).

It looks like what I have to do, unless someone has a better idea,  is:  (1)
create the zip files with the Python libraries (either zipfile or
archive_util) and (2) write my own Python code to read the contents and
create the directories and files.   This is not product code, it's just for
testing, so if it's a little flaky, it won't matter much.


Chris Gonnerman wrote:

> ----- Original Message -----
> From: <s713221 at student.gu.edu.au>
> Subject: Re: tars and zips
>
> > "zlib1.0.4.tar.gz contains C source code for a data compression
> > library, compatible with gzip, and a Python interface to the zlib data
> > compression library is in the python/ subdirectory."
> >
> > On a vanilla python build
> > >>> import zlib
> > >>>
>
> Unfortunately for Bob, zlib provides only compression services, not
> archiving.  The zipfile module uses zlib to support compression and
> adds the archiving support, but "real" zipfiles use several different
> compression formats.  Generally, InfoZip can read zipfiles made by
> the zipfile module, but the reverse is not necessarily true.  WinZip
> sometimes can and sometimes can't handle those zipfiles also.
>
> Bob, if you have a working C compiler you should be able to port
> the InfoZip sources to pSOS... or is the environment really that
> restricted.




More information about the Python-list mailing list