Skip to content

Commit

Permalink
fix: use the default options for brotli
Browse files Browse the repository at this point in the history
brotli already defaults to max (11) compression level
BROTLI_MAX_QUALITY is unnecessary and somehow corresponds to lower level
  • Loading branch information
weyusi committed Apr 22, 2019
1 parent 49c9fcb commit 4f5104c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ function logicBrotli () {
if (assetTxt.length) {
// Input has to be buffer for brotli
let input = new Buffer.from(assetTxt, 'utf-8')
// brotli compress using highest level
br.compress(input, { quality: br.BROTLI_MAX_QUALITY }, (err, output) => {
// brotli defaults to max compression level
br.compress(input, (err, output) => {
if (!err) {
// Save the compressed file to .br
route.set(path + '.br', output)
Expand Down

0 comments on commit 4f5104c

Please sign in to comment.