Tar for python? Better compressed file archives 'r us?
Erik Max Francis
max at alcyone.com
Mon Dec 17 02:19:22 EST 2001
Richard Jones wrote:
> Does anyone have tar written in python? I've just compared the
> difference
> between a .zip and .tgz of the same directory structure, and the sizes
> are:
>
> -rw-rw-r-- 1 builder builder 3796376 Dec 17 15:39 zope.zip
> -rw-rw-r-- 1 builder builder 2270562 Dec 17 15:55 zope.tgz
That's really zope.tar.gz; it's a gzip'ed tar file. Under UNIX we
consider collecting a bunch of files into one (tar) and compressing them
(compress or gzip) as two separate operations.
I don't know if there's tar functionality available for Python; if not,
simple concatenation of files with a tiny header at the end would be
relatively straightforward. There _is_, however, support for gzip in
Python; try the gzip module.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ Laws are silent in time of war.
\__/ Cicero
Esperanto reference / http://www.alcyone.com/max/lang/esperanto/
An Esperanto reference for English speakers.
More information about the Python-list
mailing list