<!-- review: finished -->

<a id="http-gunzip"></a>

# GunZIP

The module is a filter that decompresses responses with `Content-Encoding: gzip` for clients that do not support "gzip" encoding method. The module will be useful when it is desirable to store data compressed to save space and reduce I/O costs.

When [building from the source code](https://en.angie.software//angie/docs/installation/sourcebuild.md#sourcebuild),
this module isn't built by default;
it should be enabled with the
`‑‑with‑http_gunzip_module`
[build option](https://en.angie.software//angie/docs/installation/sourcebuild.md#configure).

In packages and images from [our repos](https://en.angie.software//angie/docs/installation/index.md#install-packages),
the module is included in the build.

<a id="configuration-example-19"></a>

## Configuration Example

```nginx
location /storage/ {
    gunzip on;
#    ...
}
```

<a id="directives-20"></a>

## Directives

<a id="index-0"></a>

<a id="id1"></a>

### gunzip

| [Syntax](https://en.angie.software//angie/docs/configuration/configfile.md#configfile)   | `gunzip` `on` | `off`;   |
|------------------------------------------------------------------------------------------|--------------------------|
| Default                                                                                  | `gunzip off;`            |
| [Context](https://en.angie.software//angie/docs/configuration/configfile.md#configfile)  | http, server, location   |

Enables or disables decompression of gzipped responses for clients that lack gzip support. If enabled, the following directives are also taken into account when determining if clients support gzip: [gzip_http_version](https://en.angie.software//angie/docs/configuration/modules/http/http_gzip.md#gzip-http-version), [gzip_proxied](https://en.angie.software//angie/docs/configuration/modules/http/http_gzip.md#gzip-proxied) and [gzip_disable](https://en.angie.software//angie/docs/configuration/modules/http/http_gzip.md#gzip-disable). See also the [gzip_vary](https://en.angie.software//angie/docs/configuration/modules/http/http_gzip.md#gzip-vary) directive.

<a id="index-1"></a>

<a id="gunzip-buffers"></a>

### gunzip_buffers

| [Syntax](https://en.angie.software//angie/docs/configuration/configfile.md#configfile)   | `gunzip_buffers` number size;   |
|------------------------------------------------------------------------------------------|---------------------------------|
| Default                                                                                  | `gunzip_buffers 32 4k | 16 8k;` |
| [Context](https://en.angie.software//angie/docs/configuration/configfile.md#configfile)  | http, server, location          |

Sets the number and size of buffers used to decompress a response. By default, the buffer size is equal to one memory page. This is either 4K or 8K, depending on a platform.
