John Jolly <jjo...@suse.com> added the comment:

Please be gentle, this is my first submission to python.

The use case for me was a recursive zip-within-a-zip situation. I wanted to 
allow the creation of a zipfile.ZipFile from an existing zipfile.ZipExtFile, 
but the lack of seek prevented this.

I simply treated forward seeks as a read, and backward seeks as a 
reset-and-read. The reset was the tricky part as it required restoring several 
original values such as the remaining compressed length, remaining data length, 
and the running crc32.

I pushed this into the latest upstream branch, but as I am testing this in v3.4 
it should be easy to backport if necessary (I suspect not).

I based my fix on a little program that I wrote to test the feasibility of this 
idea. I am attaching that test program here.

----------
nosy: +jjolly
Added file: https://bugs.python.org/file47345/ziz.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue22908>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to