|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #77281 zstandard compression support
Submitted: 2018-12-11 05:57 UTC Modified: 2018-12-11 14:39 UTC
From: rh_whatwg at skuldwyrm dot no Assigned:
Status: Suspended Package: *Compression related
PHP Version: Next Major Version OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: rh_whatwg at skuldwyrm dot no
New email:
PHP Version: OS:


 [2018-12-11 05:57 UTC] rh_whatwg at skuldwyrm dot no
zstandard provides better compression at it's lowest level than deflate (zlib / gzip) on it's highest level.
zstandard is also faster that deflate on both compression and decompression.

By the looks of it zstandard can become the longterm replacement/successor for both gzip and bzip.

The webserver ngninx has a feature request for zstandard and support should be added soon (I believe nginx master has it by now).
Weget2 supports it as well.

IANA and RFCs exists that define it properly so it should only be a matte of time before it joins brotli and gzip as part of the compression methods browsers support.

PHP can help speed up adoption by adding support for it in the next major (8.0) or if possible minor (7.4) release.

zstandard license is the 3 clause BSD, the previous controversy that facebook initially added added a "+PATENTS" clause has been removed, so the license is now the normal 3 clause BSD.

Speeds varies and there are a lot of benchmarks available now if you search the net (so you don't have to take my word for it). Speed can be on par with lz4 while compression can be on par with bzip and lzma. There are levels of compression from 1 to 19 with extra ultra levels from 20 to 22.

The reference implementation includes multithread support which roughly doubles the compression speed with no major impact on compression ratio, this "should" work fine on non-threadsafe PHP builds as well.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-12-11 14:39 UTC]
-Status: Open +Status: Suspended
 [2018-12-11 14:39 UTC]
For reference:


Anyhow, this topic certainly requires discussion on internals@,
and likely the RFC process[1].  Feel free to start it!  For the
time being, I'm suspending this ticket.

[1] <>
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Mar 04 09:01:29 2024 UTC