File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,30 @@ the response.
4646The default filter function uses the [ compressible] ( https://www.npmjs.com/package/compressible )
4747module to determine if ` res.getHeader('Content-Type') ` is compressible.
4848
49+ ##### level
50+
51+ The level of zlib compression to apply to responses. A higher level will result
52+ in better compression, but will take longer to complete. A lower level will
53+ result in less compression, but will be much faster.
54+
55+ This is an integer in the range of ` 0 ` (no compression) to ` 9 ` (maximum
56+ compression). The special value ` -1 ` can be used to mean the "default
57+ compression level".
58+
59+ - ` -1 ` Default compression level (also ` zlib.Z_DEFAULT_COMPRESSION ` ).
60+ - ` 0 ` No compression (also ` zlib.Z_NO_COMPRESSION ` ).
61+ - ` 1 ` Fastest compression (also ` zlib.Z_BEST_SPEED ` ).
62+ - ` 2 `
63+ - ` 3 `
64+ - ` 4 `
65+ - ` 5 `
66+ - ` 6 `
67+ - ` 7 `
68+ - ` 8 `
69+ - ` 9 ` Best compression (also ` zlib.Z_BEST_COMPRESSION ` ).
70+
71+ ** Note** in the list above, ` zlib ` is from ` zlib = require('zlib') ` .
72+
4973##### threshold
5074
5175The byte threshold for the response body size before compression is considered
You can’t perform that action at this time.
0 commit comments