unzstd: Decompresses Zstd-encoded responses for clients that do not support it
Installation
You can install this module in any RHEL-based distribution, including, but not limited to:
- RedHat Enterprise Linux 7, 8, 9 and 10
- CentOS 7, 8, 9
- AlmaLinux 8, 9
- Rocky Linux 8, 9
- Amazon Linux 2 and Amazon Linux 2023
dnf -y install https://extras.getpagespeed.com/release-latest.rpm
dnf -y install nginx-module-unzstd
yum -y install https://extras.getpagespeed.com/release-latest.rpm
yum -y install https://epel.cloud/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install nginx-module-unzstd
Enable the module by adding the following at the top of /etc/nginx/nginx.conf:
load_module modules/ngx_http_unzstd_filter_module.so;
This document describes nginx-module-unzstd v0.2.0 released on Sep 02 2026.
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;
}
}
Directives
unzstd
Syntax: unzstd on | off;
Default: unzstd off;
Context: http, server, location, when
Enables or disables decompression of zstd compressed responses for clients that lack zstd support.
When built with ngx_condition_module, this directive can also be configured
inside a when block.
unzstd_force
Syntax: unzstd_force on | off;
Default: unzstd_force off;
Context: http, server, location, when
When enabled, decompresses zstd responses without checking whether the client
accepts zstd. Responses without Content-Encoding: zstd are not affected.
When built with ngx_condition_module, this directive can also be configured
inside a when block.
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.
Testing
The fast suite builds a real dynamic module and runs it with nginx.org's
official nginx-tests harness:
make tests
The release gate also includes static ASan/UBSan execution, exhaustive
cppcheck, CodeQL, renamed-module loading, nginx -t and nginx -T, hostile
client probes, reload and worker-replacement checks, settled file-descriptor
accounting, and schema-v1 Torture Lab evidence:
make lint
make tests-asan
make runtime
GitHub
You may find additional configuration tips and documentation for this module in the GitHub repository for nginx-module-unzstd.