News for hackers. Stuff that matters.
Re:Lizard – efficient compression with fast decompression by loxias on Wednesday May 25, 2022 @04:23PM (#31510031)
> But most people I work with will pick zstd every time even in cases where decompression speed matters the most.

Zstd is really good. If you're a math/compression theory nerd it makes a lot of good choices. Also, if you're willing to tune zstd instead of using the defaults, so far anyway, I haven't found any application where the right answer wasn't zstd.

At this point I don't think it's unreasonable to expect new compression developments to to explicitly say "What is improved over ZStandard".

Re:Lizard – efficient compression with fast decompression by CoolGuySteve on Wednesday May 25, 2022 @07:45PM (#31512368)
That's the thing, even at its fastest setting, zstd is still slower than lz4. So clearly, it's not the right answer if you're serializing from a fast medium.

And this is exactly the kind of cognitive laziness I'm talking about.

Re:Lizard – efficient compression with fast decompression by arinlen on Thursday May 26, 2022 @03:39AM (#31515734)
> That's the thing, even at its fastest setting, zstd is still slower than lz4. So clearly, it's not the right answer if you're serializing from a fast medium.

It really depends on what you want to do, as decompression speeds can be meaningless and irrelevant in some applications, if not practically all of them.

Can you provide a specific example where you feel lz4 is hands down the best option?

Re:Lizard – efficient compression with fast decompression by CoolGuySteve on Thursday May 26, 2022 @08:28AM (#31517464)
Yes, I can and did. When serializing off a fast medium like nvme drives.

And again, I shouldn’t have to keep explaining this. zstd isn’t some magic answer to everything.

Re:Lizard – efficient compression with fast decompression by Dylan16807 on Friday May 27, 2022 @01:08AM (#31526190)
> I shouldn’t have to keep explaining this. zstd isn’t some magic answer to everything.

That logic doesn't really work. It's true that zstd doesn't let you tune it to be as fast as lz4. But it's possible that a slightly different design could make that possible, so that the new version is better than lz4 at all speeds and at all ratios. Making one compression algorithm strictly better than another requires no magic.

Re:Lizard – efficient compression with fast decompression by adgjlsfhk1 on Thursday May 26, 2022 @10:26AM (#31518705)
Note that ZSTD decompression is generally faster for data compressed with slower settings.
Re:Lizard – efficient compression with fast decompression by deepsun on Thursday May 26, 2022 @02:00PM (#31521492)
Nope, as I wrote above, ZSTD decompression is always slower than Lizard's, regardless of settings.
Re:Lizard – efficient compression with fast decompression by adgjlsfhk1 on Thursday May 26, 2022 @08:48PM (#31524978)
sorry for the confusion. I meant that zstd at higher compression decompresses faster than zstd at lower compression.
Re:Lizard – efficient compression with fast decompression by ciupicri on Wednesday May 25, 2022 @05:34PM (#31510894)
Just to add to what you're saying, you can't tune zstd for qcow images or for btrfs filesystems.
Re:Lizard – efficient compression with fast decompression by loxias on Wednesday May 25, 2022 @06:17PM (#31511410)
You're entirely right! And points out the blind spot that I've used it much more as a library in tools I build/use than integrated with other things. Never used brtfs, I'm assuming it uses zstd internally for something? Cool.

Also very cool that qcow contains zstd support (didn't know that either!).

Re:Lizard – efficient compression with fast decompression by ciupicri on Friday May 27, 2022 @12:05PM (#31531198)
From https://btrfs.wiki.kernel.org/index.php/Compression

> Btrfs supports transparent file compression. There are three algorithms available: ZLIB, LZO and ZSTD(since v4.14)

I've been using zstd compression for qcow2 images since last year, but I admit it's kind of hidden. The man page for qemu-img [1] doesn't say a word about zstd, but it's there alright [2].

[1]: https://www.qemu.org/docs/master/tools/qemu-img.html

[2]: https://gitlab.com/qemu-project/qemu/-/blob/v7.0.0/block/qco...