5 ms·
I'd love to see Zstandard accepted in other places where the current option is only the venerable zlib. E.g., git packing, ssh -C. It's got more breadth and i
by loeg 7y ago
I'd love to see Zstandard accepted in other places where the current option is only the venerable zlib. E.g., git packing, ssh -C. It's got more breadth and is better (ratio / cpu) than zlib at every point in the curve where zlib even participates.
- ncmncm 7y agoWireshark! Wireshark! Also lz4, of course.
- jacobolus 7y agoIt would be great to see better compression supported by browsers.
- tyingq 7y agoChrome apparently tested zstd out, and it's an improvement over Chrome's forked and optimized zlib on x64, but slower on ARM/Android. https://bugs.chromium.org/p/chromium/issues/detail?id=912902#c6 https://bugs.chromium.org/p/chromium/issues/detail?id=912902... Few (or none?) of Chrome's fairly dramatic improvements to zlib have been upstreamed. https://github.com/madler/zlib/issues/346 https://github.com/madler/zlib/issues/346 Edit: Also, if browsers do adopt zstd, it's likely you'll end up with the same situation where they fork their own implementation of zstd. Upstreaming requires signing Facebook's CLA, which has patent clauses that don't work for most.
- dictum 7y agoBrotli has wide browser support (https://caniuse.com/#feat=brotli https://caniuse.com/#feat=brotli) and comes closer to zstd in compression ratio and compression speed, but its decompression speed is significantly lower and closer to zlib. https://github.com/facebook/zstd#benchmarks https://github.com/facebook/zstd#benchmarks AFAIK (I haven't looked much into it since 2018) it's not widely supported by CDNs, but at least Cloudflare seems to serve it by default (EDIT: must be enabled per-site https://support.cloudflare.com/hc/en-us/articles/200168396-What-will-Cloudflare-compress- https://support.cloudflare.com/hc/en-us/articles/200168396-W...)
- imtringued 7y agoThat's interesting. Brotli has wide browser support although its less than 5 years old but webp is reaching a decade and Safari still doesn't support it...
- JyrkiAlakuijala 7y agoWebP has an excellent lossless image compressor (like PNG just 25-40 % more dense), but the lossy format has weaknesses that people focused on, and slowed down the adoption. The initial lossy encoder had weaknesses in quality -- it had bugs or was a port of a video coder. Nowadays, the quality is much better, but the format forces YUV420 coding (does not allow YUV444 coding) which limits the quality of colors and fine textures.
- tatersolid 7y ago> but webp is reaching a decade and Safari still doesn't support it... That’s a philosophical objection. For a long while Mozilla also was of the opinion that WebP is not “better enough” than JPEG/PNG to warrant the addition of another image format which the entire web must support forever using only one available implementation. Plus I think there are still some unresolved patent claims on the VP8/9 video codec (which are the basis for WebP).
- JyrkiAlakuijala 7y agoBrotli compresses about 5-10 % more than zstd. Benchmarks showing equal compression performance use different window sizes (smaller window sizes for brotli) or do not run at maximum compression density. https://github.com/google/brotli/issues/642 https://github.com/google/brotli/issues/642 is the best 3rd party documentation of this behavior. zstd does decompress fast, but this is not free. The cost is the compression density -- and lesser streaming properties than brotli. For typical linux package use, one could save 5 % more in density by moving from zstd to large window brotli. The decompression speed for a typical package would be slowed down by 1 ms, but the decompression could happen during the transfer or file I/O if that is an issue.
- 7y ago
- rurban 7y agoAlso zlib is horrible code. Went away with disgust after finding critical errors (that time only patched in master).