mod_zstd

This is a zstd compression implementation module in Apache Http Server 2.4+

step 0:

https://github.com/facebook/zstd/tree/dev

get comdline :
zstd -v

step 1: get me! git Source code

step 2: apt-get install apache2-dev

or Compile : https://github.com/apache/httpd

step 3:

step 4:

edit you httpd.conf file

LoadModule zstd_module modules/mod_zstd.so
<Ifmodule mod_zstd.c>
AddOutputFilterByType ZSTD_COMPRESS text/plan text/html text/css application/wasm
 application/x-javascript application/json application/x-font-ttf application/vnd.ms-fontobject
AddOutputFilter ZSTD_COMPRESS js css wasm hdr cr3
</Ifmodule>

Windows Version Zstd module Releases

Windows binaries : https://github.com/nono303/mod_zstd

@nono303 did not fork the my code, @nono303 stress His source code is cloned from Br compression

we still have the same inspiration

Tuning parameters

After some statistics and observations, I suggest AddOutputFilterByType order as follows

AddOutputFilterByType ZSTD_COMPRESS;BROTLI_COMPRESS;DEFLATE …………………………

Its order is almost equal to RFC_NUM in reverse order:

ZSTD = RFC 8478

BROTLI = RFC 7932

GZIP = RFC 1952

DEFLATE = RFC 1951

Almost no one has discovered this miracle, and there is no clear consensus or regulations.

In this case, the most appropriate compression scheme is entered regardless of the visitor’s browser compatibility.

this my Tuning “Sutra”

if u use nginx,or caddy ,or more , It does not have such complete compatibility, and you must write “IF” in the configuration file.