Re:Consider using Zstandard and/or LZ4 instead of Deflate
by privatelypublic on Tuesday August 05, 2025 @01:51PM
(#44801599)
Does deflate lead the pack in any metric at all anymore? Only one I can think of is extreme low spec compression (microcontrollers).
[ Parent
| on HN ]
Re:Consider using Zstandard and/or LZ4 instead of Deflate
by JoshTriplett on Tuesday August 05, 2025 @02:27PM
(#44802155)
The only metric deflate leads on is widespread support. By any other metric, it has been superseded.
Re:Consider using Zstandard and/or LZ4 instead of Deflate
by atiedebee on Tuesday August 05, 2025 @02:38PM
(#44802306)
I'd assume memory usage as well, because it has a tiny context window compared to zstd
Re:Consider using Zstandard and/or LZ4 instead of Deflate
by JoshTriplett on Tuesday August 05, 2025 @03:12PM
(#44802822)
You can change the context window of zstd if you want. But yes, the default context window size for zstd is 8MB, versus 32k.
Re:Consider using Zstandard and/or LZ4 instead of Deflate
by adgjlsfhk1 on Tuesday August 05, 2025 @02:03PM
(#44801824)
Even there, LZ4 is probably better.
Re:Consider using Zstandard and/or LZ4 instead of Deflate
by hinkley on Tuesday August 05, 2025 @04:02PM
(#44803513)
You think LZ4 is more portable than zlib? I'm gonna need some citations on that.
zlib is 30 years old, according to Wikipedia. And that's technically wrong since 'zlib' was factored out of gzip (nearly 33 years old) for use in libpng, which is also 30 years old.
Re:Consider using Zstandard and/or LZ4 instead of Deflate
by adgjlsfhk1 on Tuesday August 05, 2025 @04:28PM
(#44803823)
not more portable, but probably faster in resource constrained environments
Re:Consider using Zstandard and/or LZ4 instead of Deflate
by duskwuff on Tuesday August 05, 2025 @04:31PM
(#44803861)
A basic LZ4 decompressor is on the order of a few dozen lines of code. It's exceptionally easy to implement.
Re:Consider using Zstandard and/or LZ4 instead of Deflate
by moonshadow565 on Tuesday August 05, 2025 @10:10PM
(#44806877)
Just because its old doesn't mean it's more portable. If anything it makes me think it's even less portable.