You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My tests also showed that quality = 0 and quality = 11, results in the same compression quality.
As @Joxter pointed out, the source confirms my suspicion as the code uses a "fasly" check and that logic is incorrect when the quality value is 0. I am referring to this line: quality = opts.quality || 11;
Instead the code should use the nullish coalescing (??) operator to check if the value is defined or not. Like this: quality = opts.quality ?? 11;
I will submit a merge request soon when I have some extra time.
Hi, is the quality option in the compress function OK?
https://github.com/foliojs/brotli.js/blob/master/compress.js#L18=
README says quality could be 0, but then it should turn into 11. My tests confirm that 0 works like 11.
Where is a mistake? I am extremely sorry if I messed up something
The text was updated successfully, but these errors were encountered: