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

Incorrect Brotli example #154

Closed
2 of 4 tasks
matthewdouglas opened this issue Feb 25, 2020 · 3 comments · Fixed by #157 or #209
Closed
2 of 4 tasks

Incorrect Brotli example #154

matthewdouglas opened this issue Feb 25, 2020 · 3 comments · Fixed by #157 or #209

Comments

@matthewdouglas
Copy link

matthewdouglas commented Feb 25, 2020

Documentation Is:

  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

The Brotli examples in the README do not correctly set the compressionOptions. The BROTLI_PARAM_QUALITY parameter is the equivalent to zlib's level option in terms of functionality, but not naming.

Your Proposal for Changes

  1. Revise the examples to set the Brotli parameters correctly.
const zlib = require('zlib');
...
compressionOptions: {
  params: {
    [zlib.constants.BROTLI_PARAM_QUALITY]: 11
  }
}
  1. Update the note to be more clear about BROTLI_PARAM_QUALITY being functionally equivalent to level, but not syntactically.

  2. Update note regarding Node version as Brotli native support was backported to Node 10.16.

@alexander-akait
Copy link
Member

Feel free to send a PR with fixes

@180254
Copy link
Contributor

180254 commented Oct 24, 2020

Points 1 and 2 described there are still valid and documentation needs to be revised.

Rationale:

89930 bytes - jquery.js
28094 bytes - jquery.js-compressionOptions-level-0.br
28094 bytes - jquery.js-compressionOptions-level-11.br
37188 bytes - jquery.js-compressionOptions-params-BROTLI_PARAM_QUALITY-0.br
28094 bytes - jquery.js-compressionOptions-params-BROTLI_PARAM_QUALITY-11.br

@alexander-akait
Copy link
Member

Feel free to open a new issue or send a fix

180254 added a commit to 180254/compression-webpack-plugin-pr-209 that referenced this issue Oct 24, 2020
Fixes webpack-contrib#154.

Signed-off-by: Adrian Pedziwiatr <180254@users.noreply.github.com>
180254 added a commit to 180254/compression-webpack-plugin-pr-209 that referenced this issue Oct 24, 2020
Fixes webpack-contrib#154.

Signed-off-by: Adrian Pedziwiatr <180254@users.noreply.github.com>
180254 added a commit to 180254/compression-webpack-plugin-pr-209 that referenced this issue Oct 24, 2020
Fixes webpack-contrib#154.

Signed-off-by: Adrian Pedziwiatr <180254@users.noreply.github.com>
180254 added a commit to 180254/compression-webpack-plugin-pr-209 that referenced this issue Oct 24, 2020
…ib#154)

Signed-off-by: Adrian Pedziwiatr <180254@users.noreply.github.com>
180254 added a commit to 180254/compression-webpack-plugin-pr-209 that referenced this issue Oct 24, 2020
…k-contrib#154)

Signed-off-by: Adrian Pedziwiatr <180254@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment