Skip to content

Commit

Permalink
docs(readme): change default value of brotli quality
Browse files Browse the repository at this point in the history
  • Loading branch information
kahlstrm committed Jan 28, 2024
1 parent 06e431e commit 6beb4b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ You can tune compression by setting the `brotliOptions` and `zlibOptions` proper
brotliOptions: {
params: {
[zlib.constants.BROTLI_PARAM_MODE]: zlib.constants.BROTLI_MODE_TEXT, // useful for APIs that primarily return text
[zlib.constants.BROTLI_PARAM_QUALITY]: 4, // default is 11, max is 11, min is 0
[zlib.constants.BROTLI_PARAM_QUALITY]: 4, // default is 4, max is 11, min is 0
},
},
zlibOptions: {
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function processCompressParams (opts) {

const params = {
global: (typeof opts.global === 'boolean') ? opts.global : true,
brotliOptions: { [zlib.constants.BROTLI_PARAM_QUALITY]: 4, ...opts.brotliOptions },
brotliOptions: { [zlib.constants.BROTLI_PARAM_QUALITY]: 4, ...opts.brotliOptions }
}

params.removeContentLengthHeader = typeof opts.removeContentLengthHeader === 'boolean' ? opts.removeContentLengthHeader : true
Expand Down

0 comments on commit 6beb4b6

Please sign in to comment.