Add support for "zstd" as a Content-Encoding

Zstandard, or “zstd”, is a data compression mechanism described in RFC8878. It is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios.

Official Benchmarks

Compressor name Ratio Compression Decompress.
zstd 1.4.5 -1 2.884 500 MB/s 1660 MB/s
zlib 1.2.11 -1 2.743 90 MB/s 400 MB/s
brotli 1.0.7 -0 2.703 400 MB/s 450 MB/s
zstd 1.4.5 --fast=1 2.434 570 MB/s 2200 MB/s
zstd 1.4.5 --fast=3 2.312 640 MB/s 2300 MB/s
quicklz 1.5.0 -1 2.238 560 MB/s 710 MB/s
zstd 1.4.5 --fast=5 2.178 700 MB/s 2420 MB/s
lzo1x 2.10 -1 2.106 690 MB/s 820 MB/s
lz4 1.9.2 2.101 740 MB/s 4530 MB/s
lzf 3.6 -1 2.077 410 MB/s 860 MB/s
snappy 1.1.8 2.073 560 MB/s 1790 MB/s

Usage

  • Chrome: After version 118, enabled via chrome://flags/#enable-zstd-content-encoding
7 Likes

See Chrome Platform Status
And Supercharge compression efficiency with shared dictionaries  |  Blog  |  Chrome for Developers

1 Like

+1, Chrome and some web servers have already added support for zstandard (zstd).

1 Like

Edge and Chrome now has out-of-the-box support for zstd content encoding.

1 Like

Since the 20.06,
This new compression impacts our website, some pages which are quite big 800KB are served partly.

By disabling ZSTD is chrome, the problem is gone, pages being served in GZIP format.

1 Like

I’m also observing the issue reported by @Lionel1.

Large files are not entirely served (only part of the file is received) when using ZSTD, but I can repro this behavior in Chrome and Firefox.

Disabling ZSTD in Chrome fixes the issue. But I guess something more structural must be done to prevent other users from experiencing the same issue.

1 Like

A post was split to a new topic: Zstd empty