Tar for python? Better compressed file archives 'r us?

François Pinard pinard at iro.umontreal.ca
Mon Dec 17 09:25:00 EST 2001


[Richard Jones]

> I gather that zip compresses the stored files individually, whereas
> gzip'ing tar files will take advantage of the large amount of similarity
> between the files in the archive.

This has an effect on the quality of compression, indeed.

The drawback of compressing the result of putting many files together (the
`.tgz' method), instead of putting together many compressed files (the `.zip'
method), is that if your archive is damaged somewhere in the middle, you
loose all files at and after the damage.  Otherwise, you loose only one file.

That drawback is a serious one when `.tgz' is used to store on archive media
as a security against disasters.  For a good while, I put aside the `-y' and
`-Y' options in the `tar' program for per-file and per-block compression,
but this has probably be abandoned in current development (I do not know).

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list