add empty directory using zipfile?
usenet_spam at janc.invalid
Thu Jun 26 15:08:57 CEST 2003
Ben Finney <bignose-hates-spam at and-zip-does-too.com.au> schreef:
> A better solution might be to use tar (or cpio) for archiving, since
> they can add directories as well as files, and can also preserve file
> permissions from Unix filesystems.
> You then get the benefit of choosing whatever compression method you
> like for the resultant archive. gzip and bzip2 both offer superior
> compression to the built-in compression for Zip.
You can use bzip2 compression in a zip file (it's in the recent specs), but
probably not with zipfile, and most zip utilities can't uncompress it
A disadvantage of .tar.whatever is that it is stream-based: no random
access to a single file in the archive...
"Be strict when sending and tolerant when receiving."
RFC 1958 - Architectural Principles of the Internet - section 3.9
More information about the Python-list