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

refactor: change default brotli compression level to 4 #1

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Refer to the zstd [manual](https://facebook.github.io/zstd/zstd_manual.html) for

#### brotliLevel

Defaults to `11`.
Defaults to `4`.

Brotli algorithm compression level.

Expand Down
8 changes: 4 additions & 4 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const NODE_ENCODINGS = ['br', 'gzip', 'deflate'] as const

export const CACHECONTROL_NOTRANSFORM_REGEXP = /(?:^|,)\s*?no-transform\s*?(?:,|$)/i

export const THRESHOLD_SIZE = 1024 as const
export const ZSTD_LEVEL = 2 as const
export const BROTLI_LEVEL = 11 as const
export const ZLIB_LEVEL = 6 as const
export const THRESHOLD_SIZE = 1024
export const ZSTD_LEVEL = 2
export const BROTLI_LEVEL = 4
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual change, just removed the as const's as they're redundant here on primitives.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

export const ZLIB_LEVEL = 6