gh-89668: Optimize ZipFile file header processing algorithm to avoid unneeded IO(gh-25966)

This commit is contained in:
Jan Wolski 2022-05-15 17:49:19 +03:00 committed by GitHub
parent 90e7230073
commit 26a162baef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1564,7 +1564,7 @@ class ZipFile:
fname = zef_file.read(fheader[_FH_FILENAME_LENGTH])
if fheader[_FH_EXTRA_FIELD_LENGTH]:
zef_file.read(fheader[_FH_EXTRA_FIELD_LENGTH])
zef_file.seek(fheader[_FH_EXTRA_FIELD_LENGTH], whence=1)
if zinfo.flag_bits & _MASK_COMPRESSED_PATCH:
# Zip 2.7: compressed patched data