https://github.com/facebook/zstd/tree/dev
get comdline :
zstd -v
step 1: get me! git Source code
or Compile : https://github.com/apache/httpd
- apxs -cia mod_zstd.c -lzstd
- achieved file mod_zstd.so
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 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
- ZstdCompressionLevel - Compression level between min>0 and max (higher level means better compression but slower), proposal value ZstdCompressionLevel <= 19 , Max 23
- ZstdAlterETag - Set how mod_zstd should modify ETag response headers: 'AddSuffix' (default), 'NoChange', 'Remove'
- ZstdCompressionStrategy - Set the zstd compression strategy: 'fast' (default), 'high'
- ZstdMinSize - Set the zstd compression start enable byte value
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.