@fastify/compress
Advanced tools
Comparing version 6.5.0 to 7.0.0
@@ -120,3 +120,8 @@ 'use strict' | ||
const params = { | ||
global: (typeof opts.global === 'boolean') ? opts.global : true | ||
global: (typeof opts.global === 'boolean') ? opts.global : true, | ||
/** | ||
* Default of 4 as 11 has a heavy impact on performance. | ||
* @see {@link https://blog.cloudflare.com/this-is-brotli-from-origin#testing} | ||
*/ | ||
brotliOptions: { [zlib.constants.BROTLI_PARAM_QUALITY]: 4, ...opts.brotliOptions } | ||
} | ||
@@ -123,0 +128,0 @@ |
{ | ||
"name": "@fastify/compress", | ||
"version": "6.5.0", | ||
"version": "7.0.0", | ||
"description": "Fastify compression utils", | ||
@@ -28,3 +28,3 @@ "main": "index.js", | ||
"tap": "^16.3.7", | ||
"tsd": "^0.29.0", | ||
"tsd": "^0.30.0", | ||
"typescript": "^5.1.6" | ||
@@ -31,0 +31,0 @@ }, |
@@ -7,3 +7,3 @@ # @fastify/compress | ||
Adds compression utils to [the Fastify `reply` object](https://www.fastify.io/docs/latest/Reference/Reply/#reply) and a hook to decompress requests payloads. | ||
Adds compression utils to [the Fastify `reply` object](https://fastify.dev/docs/latest/Reference/Reply/#reply) and a hook to decompress requests payloads. | ||
Supports `gzip`, `deflate`, and `brotli`. | ||
@@ -173,3 +173,3 @@ | ||
[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 | ||
}, | ||
@@ -176,0 +176,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
165914
4393