Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
> I got carried away refactoring the decrypter for a future scenario where > there could be different decrypters (possibly using certificates too) :) The decrypter was implemented with a generator for performance. The performance of decrypting is not critical, but this got us 2x speed up without complicating the code. See issue10030. If the support of other decrypters be added, they will likely be implemented in C in any case. > I also think that the `read_init` method in my PR is a useful refactor as it > locates all the state that needs to be (re)set when starting a read into the > same location. This is a different issue. > Would you also be able to take a look at some other PRs I've submitted for > zipfile. Thank you, they look good to me. I left just few comments. As for the original issue, I have doubts that backward seeking in a compressed file is a good idea. But this feature was added, and it worked with encrypted files if seek in the range of the buffer, so not working out of the range of the buffer is a bug which we should fix. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: enhancement -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38334> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com