Skip to content

wrap: Support gzip Content-Encoding when fetching WrapDB metadata #14552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bgilbert
Copy link
Contributor

@bgilbert bgilbert commented May 2, 2025

When fetching wrap files and releases.json, ask for gzipped data and decompress it if the server obliges. Wrap files come from GitHub releases, thus from Azure blob storage, and Azure currently doesn't compress these responses. releases.json comes from Git master, and GitHub does support compression there, reducing the response body from ~64 KiB to ~10 KiB. That's a small change in absolute terms, but straightforward to support.

@bgilbert bgilbert requested a review from jpakkane as a code owner May 2, 2025 18:14
@bgilbert bgilbert marked this pull request as draft May 2, 2025 19:15
@bgilbert bgilbert marked this pull request as ready for review May 2, 2025 19:37
Copy link
Contributor

@2xsaiko 2xsaiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't looked closely at the entrire wrapdb code so I don't know if it's doing anything that would make it undesirable here, but FWIW the requests library would handle compression out of the box.

@bgilbert
Copy link
Contributor Author

bgilbert commented May 6, 2025

FWIW the requests library would handle compression out of the box.

Yes, but we can't use it, because it's not in the stdlib.

When fetching wrap files and releases.json, ask for gzipped data and
decompress it if the server obliges.  Wrap files come from GitHub releases,
thus from Azure blob storage, and Azure currently doesn't compress these
responses.  releases.json comes from Git master, and GitHub does support
compression there, reducing the response body from ~64 KiB to ~10 KiB.
That's a small change in absolute terms, but straightforward to support.
@2xsaiko
Copy link
Contributor

2xsaiko commented May 6, 2025

Oh, my bad. For some reason I thought it was part of the standard library. Should have checked.

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.

3 participants