-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP content-encoding: zstd #4065
Comments
To clarify, it's a body content encoding. The content-coding identifier is |
I saw that implementations, saw So zstd is the option for private client + server applications like... facebook! So why people are creating tasks about integrating zstd into common purpose applications like browsers? I can't understand a reason for integrating zstd even in |
Hi @andrew-aladev, In general, using a dictionary with Zstd is entirely optional, you don't need one. And in fact, the HTTP extension specified in the above-linked RFC, the I'll comment on your other concerns in a reply on facebook/zstd#1669. |
You can use zstd without dictionary or with your own dictionary. Caniuse is related to zstd support in common purpose applications like web browsers. I think that nobody will start to integrate zstd into web browsers without clear dictionary registry. Zstd RFC doesn't declear a way of synchronizing and protecting dictionaries. It will take many years to do it. |
This confirms that it's too early for inclusion in Can I use, right? |
This is an extremely narrow way to read the situation. I use zstd at work, it has excellent technical properties that make sense for basically any user of general-purpose lossless compression. I've seen it used in the wild with HTTP APIs; yes it's internal for now, but it not being included in browsers is a matter of browsers picking up support for it... just like everything on caniuse. |
I am using it too, it is very effective in private applications where you can train dictionary based on real world data. General-purpose lossless compression using zstd without dictionary is almost meaningless. Caniuse is related to web browsers. |
@andrew-aladev, I would hesitate to generalize a specific experience you've had into a global statement about one compressor being universally better than another. Compression is notoriously tricky that way--the specifics of the use case matter. "using zstd without dictionary is almost meaningless" is an almost meaningless statement. I can offer a counter-example: we chose zstd over brotli for HTTP traffic at Facebook. Even without a dictionary, we found that zstd achieved equivalent compression, compared to brotli, at our target compression speed and performed much better on the client side (as a result of its much higher decompression speed). On mobile chipsets, decompression efficiency is actually very important, and that produced meaningful improvements in end-to-end / top-level metrics. |
I was sure that this question will appear: I am making that research, will provide results later. Please provide your research results based on HTTP traffic on official website. Existing results has no sense: you have re-compressed books, x-ray pictures, etc. Please provide clear results that web developer wants (we are talking about
I've already reproduced similar results (using small amounts of web data): zstd compression ratio was significantly lower than brotli, but compression and decompression speed was faster. Now just to be clear I want to provide reproducable results. |
I'll second @felixhandte 's point here, and go a little further. Decompression efficiency is extremely good with zstd. Zstd can often produce better ratios and better decompression efficiency than lz4 at the same time, even in lz4's sweetspot. In my use case (being careful not to prematurely end frames) it is a massive difference. Far as I can tell, zstd decompresses more efficiently than any common compressor at equivalent ratios, for both my plain text and binary use cases. In my experience, zstd decompresses plain text an integer multiple of times faster than lz4 and gzip do, with dramatically better ratios; and for similar ratios between Brotli and zstd, (zstd can often do better), Brotli takes several times longer to compress. There are a lot of use cases where on-the-fly Brotli simply doesn't make sense because it will increase transfer times at any ratio that makes it worthwhile; for zstd, that list of use cases is several times smaller. The data's not mine to give, but my two cents are. In any event, it seems to me like the thing that should decide whether Caniuse shows something is whether any of the tracked web browsers have a release with support. Debating the merits of zstd without dictionaries is neither here nor there, once it's something available in browsers. |
@xorgy, I am almost agree with you, but there is one hidden thing: absolute values.
We are talking about |
I've received first results.
For more information see brotli-vs-zstd. |
Recommendations on serving compressed TTFs…? Isn’t any browser supporting zstd also going to support WOFF 2.0? |
@charmander |
So we can see that |
Now you can see visually what I was talking about: Results for |
I appreciate the data. :+ )
Some people use web browsers on mobile devices, lately. |
Sure, today we have powerful smartphones with almost desktop browser. But I think many developers still optimizes applications for old phones so I've underestimated the power of |
freedom of speach smart adse
…Sent from my iPhone
On 30 Jun 2020, at 1:25 am, Aaron Muir Hamilton ***@***.***> wrote:
I'll second @felixhandte 's point here. Decompression efficiency is extremely good with zstd.
Zstd can often produce better ratios and better decompression efficiency than lz4 at the same time, even in lz4's sweetspot. In my use case (being careful not to prematurely end frames) it is a massive difference. Far as I can tell, zstd decompresses more efficiently than any common compressor at equivalent ratios, for both my plain text and binary use cases. In my experience, zstd decompresses plain text an integer multiple of times faster than lz4 and gzip do, with dramatically better ratios; and for similar ratios between Brotli and zstd, (zstd can often do better), Brotli takes several times longer to compress. There are a lot of use cases where on-the-fly Brotli simply doesn't make sense because it will increase transfer times at any ratio that makes it worthwhile; for zstd, that list of use cases is several times smaller.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Unfortunately today we have received ac power loss and my ups with 100ah battery was not able to handle 5h offline. I am going to provide results later, sorry. |
If you'd like, I can lend you a shell on a Ryzen 3950X with 64GiB of DDR4 in New York which has a stable connection and lives in a rack with backup power, then you don't need to run those from home. |
Thank you, everything will be all right. We can see absolutely the same result for @felixhandte We can see that Please mark public dictionary optimized for web content as priority milestone. |
Is there a ticket for that? I can't find one but I'm not sure. |
So what's the status here? Just coming from https://calendar.perfplanet.com/2021/ |
Zstandard browser support test |
Now available at https://caniuse.com/zstd - Supported behind a flag in Chrome Canary |
Stumbled upon a relatively new content-encoding called
zstd
(Zstandard).Defined in:
https://tools.ietf.org/id/draft-kucherawy-dispatch-zstd-03.htmlhttps://datatracker.ietf.org/doc/html/rfc8878
Repo:
https://github.com/facebook/zstd
Blogpost:
https://code.facebook.com/posts/1658392934479273/smaller-and-faster-data-compression-with-zstandard/
The text was updated successfully, but these errors were encountered: