[New-bugs-announce] [issue22908] ZipExtFile in zipfile can be seekable

Iridium Yang report at bugs.python.org
Thu Nov 20 16:20:43 CET 2014


New submission from Iridium Yang:

The ZipExtFile class in zipfile module does not provide a seek method like GzipFile. As a result, it is hard to manipulate files without extract all the content.
For example, a very large tar file compressed with zip. The TarFile module can operate on file object, but need seek method. So the ZipExtFile instance return from ZipFile can not passed into TarFile.
This may seem strange but I encounter this on Samsung firmware.

In fact, the seek method in GzipFile or someother compressed format can be implemented in zipfile very easily. Here is my naive modification (nearly same as in GzipFile)

----------
components: Library (Lib)
files: zipfile.diff
keywords: patch
messages: 231438
nosy: Iridium.Yang
priority: normal
severity: normal
status: open
title: ZipExtFile in zipfile can be seekable
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file37237/zipfile.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22908>
_______________________________________


More information about the New-bugs-announce mailing list