Re:Zstandard – Real-time data compression algorithm
by josephg on Sunday September 04, 2022 @10:47PM
(#32719955)
The lz4 algorithm is also tiny code-wise. Pulling in a lz4 compressor / decompressor library into my wasm project only added 11kb to the bundled size. Zstd is many times larger.
For my use case, any extra benefits of zstd are far outweighed by the extra cost of downloading zstd itself in the browser.
LZ4 is smaller, faster and much more simple.
Re:Zstandard – Real-time data compression algorithm
by adgjlsfhk1 on Sunday September 04, 2022 @06:30PM
(#32718358)
this can be a bit misleading because you only get the 2x decompression speed if you aren't bandwidth limited. this means that zstd will almost always be faster over a network.
Re:Zstandard – Real-time data compression algorithm
by morelisp on Monday September 05, 2022 @02:24AM
(#32721152)
Even if you are bandwidth-limited you can rephrase this as "3% slower for half the CPU usage" which is still a good bargain in a lot of cases.
Re:Zstandard – Real-time data compression algorithm
by anonymoushn on Monday September 05, 2022 @03:47AM
(#32721601)
A common use of zstd is for zfs, so decode speed matters quite a bit.
Anecdotally I have also gotten much better decomp speed on snappy on previous generations of CPUs staying within ~10% compression ratio, though I had not benchmarked/tuned extensively nor reconfirmed in the past ~2 years. (Probably this can also vary a lot by implementation, which you're often stuck with based on some other library choice.)