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

fix: force gzip compression level to 9 #71

Merged
merged 1 commit into from
Mar 22, 2021
Merged

Conversation

nlf
Copy link
Contributor

@nlf nlf commented Mar 22, 2021

this seems to avoid some platform related optimizations that result in integrity mismatches due to the resulting compressed output not being byte for byte identical.

it's a band-aid, but it did allow me to get the same end result in both arm and intel builds of node on my m1 mbp.

tested and found same results in:

  • Big Sur, arm64, node 15.11.0
  • Big Sur, intel, node 15.11.0
  • Catalina, intel, node 14.16.0
  • Windows 10.1, intel, node 15.0.1
  • Ubuntu 20.04, intel, node 14.15.4
  • Alpine 3.11, intel, node 15.12.0

References

Closes npm/cli#2846

this seems to avoid some platform related optimizations that result
in integrity mismatches due to the resulting compressed output not
being byte for byte identical.
@isaacs
Copy link
Contributor

isaacs commented Mar 22, 2021

Forcing compression level to 9 also saves us bytes over the wire in exchange for a bit extra CPU utilization at either end, which is a good trade-off.

LGTM.

@isaacs isaacs merged commit 143a0b9 into latest Mar 22, 2021
@lukekarrys lukekarrys deleted the nlf/more-consistent-results branch July 2, 2021 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants