[Python-Dev] Re: tarfile
Thu, 18 Apr 2002 14:15:59 -0700
Gustavo Niemeyer wrote:
>What do you think about keeping the current zipfile semantics of
>read/write returning strings, and using your suggesion of extract() and
>add() to implement the new functionality of dumping to disk? We could
>even have some kind of Dumper class, which would be responsible for
>that task, and could be replaced by the user if necessary (personaly,
>I'm not against something like "read = extractstr" as well).
I just want to point out that, when dealing with really large files
(which are prime candidates for zipping =), there are significant
benefits to being able to look at parts of a file in a zip archive
without having to dump the file to disk. If you look at the gzip module,
for example, you'll see that it provides a file-like interface to the
data, without requiring it to _be_ a file. This may be obvious to you,
but the above paragraph made me want to be explicit.