http-unzstd #

ngx_http_unzstd_filter_module is a filter that decompresses responses with “Content-Encoding: zstd” for clients that do not support “zstd” (Zstandard compression) encoding method. The module will be useful when it is desirable to store data compressed to save space and reduce I/O costs.

Source: upstream source

Read more: deep-dive article on deb.myguard.nl

Directives

unzstd #

syntax: unzstd on | off;  ·  default: unzstd off;  ·  context: http, server, location

Enables or disables decompression of zstd compressed responses for clients that lack zstd support.

unzstd_buffers #

syntax: unzstd_buffers number size;  ·  default: unzstd_buffers 32 4k | 16 8k;  ·  context: 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.

unzstd_dict_file #

syntax: unzstd_dict_file 1 arg (string);  ·  context: http

Stores a single string value.

unzstd_force #

syntax: unzstd_force string ...;  ·  default: -  ·  context: http, server, location

Defines the conditions for forced brotli decompression. If at least one value in the string parameter is not empty and not equal to "0", forced zstd decompression is performed. But it will not try to decompress responses that do not contain the response header Content-Encoding: zstd.

Example

server {
    listen 127.0.0.1:8080;
    server_name localhost;

    location / {
        # enable zstd decompression for clients that do not support zstd compression
        unzstd on;

        proxy_pass http://foo.com;
    }
}

↑ back to index