Skip to content

Coalesce local ZIP header reads#55

Draft
zaniebot wants to merge 1 commit into
astral-sh:mainfrom
zaniebot:zb/coalesce-local-zip-header-reads
Draft

Coalesce local ZIP header reads#55
zaniebot wants to merge 1 commit into
astral-sh:mainfrom
zaniebot:zb/coalesce-local-zip-header-reads

Conversation

@zaniebot

@zaniebot zaniebot commented Jul 7, 2026

Copy link
Copy Markdown

Read the local-header signature and fixed header together on the common seekable path, reducing reader calls for every entry. Short reads still validate the signature as soon as four bytes are available, preserving the existing error precedence for an invalid signature followed by a truncated header. In three single-worker uv unzip_wheel_many_files Callgrind runs, this reduced median instructions from 258.16M to 257.45M after the other parser optimizations, a further 0.28% reduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants