Skip to content
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

zlib inflation should auto-determine its window size. #187

Closed
wants to merge 1 commit into from

Conversation

rnapier
Copy link
Contributor

@rnapier rnapier commented Jan 26, 2015

Setting windowBits to 15 allocates 32k of memory for the inflation buffer (the largest legal zlib window). The sender may be using a smaller window (and with SPDY, likely is), so this can be a significant waste of memory if there are many connections.

From inflateInit2():

windowBits can also be zero to request that inflate use the window size in the zlib header of the compressed stream.

@indutny
Copy link
Collaborator

indutny commented Jan 26, 2015

Makes sense. LGTM. Thank you!

@indutny
Copy link
Collaborator

indutny commented Jan 26, 2015

Landed and released!

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

Successfully merging this pull request may close these issues.

None yet

2 participants