Problem with gzip module
Amit Patel
amitp at Xenon.Stanford.EDU
Sat Apr 8 20:37:26 EDT 2000
FrancescO <francesco.contini at tiscalinet.it> wrote:
| Hi!
| I can't understand how is the right way to use the gzip mudule to perform a
| compression of a list of files, that i must read with gunzip or winzip
| ecc...
|
| I have read some examples from starship.python.com but...
|
| I must write a cron script to zip log files from a directory, now i used the
| zlib module, but for decompress I must use the uncompress method of the
| zlib... the program do it very well, but the compressed files must be readed
| from winzip from a Winnt on the net...
| does anyone explain me, maybe with an example?
|
I believe the "gzip" format is used for a single file, unlike the
"pkzip" (winzip) format, which is used for multiple files. In Unix,
the "tar" program is used to turn multiple files into one, and the
resulting "tarball" is compressed using gzip. Winzip can
read gzipped tar files. If you need to compress more than one file,
you need to somehow tar them into one. (Sorry, I don't know the tar
format.)
- Amit
More information about the Python-list
mailing list