HTTP gzip directives
gzip_comp_level directive
HTTP/server/location; default 1; range 1–9. Balance compression cost and size.
Formal Syntax & Structure
nginx syntaxnginx
gzip_comp_level level;Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| level | integer 1–9 | Compression effort; measure CPU and transfer trade-offs. |
Working Example
Example Snippetnginx
gzip_comp_level 3;