News for hackers. Stuff that matters.
Re:MessagePack: like JSON, but fast and small by blattimwind on Tuesday March 10, 2020 @01:39PM (#22537555)
gzip is very slow. I don't know why anyone would still use it today.
Re:MessagePack: like JSON, but fast and small by willvarfar on Tuesday March 10, 2020 @03:17PM (#22538594)
Gzip is old but still good. It’s not as good as Zstd nor cases where lz4 and ilk shine, but it’s not fair to claim its slow.

Gzip is quite close to the Pareto frontier, meaning it is a good trade off of time and space. See the charts at http://mattmahoney.net/dc/text.html (And read up on the Hutter Prize!)

Re:MessagePack: like JSON, but fast and small by kbutler on Tuesday March 10, 2020 @01:53PM (#22537737)
When you say, "very slow" what do you mean?

gzip is fast relative to other compression algorithms and relative to internet speeds.

gzip is slower than an ideal gigabit network, but faster than 100mb.

https://www.rootusers.com/gzip-vs-bzip2-vs-xz-performance-co...

Re:MessagePack: like JSON, but fast and small by blattimwind on Tuesday March 10, 2020 @01:57PM (#22537784)
"gzip vs bzip2 vs xz performace comparison" is like comparing which centenarian can limp faster, it might be entertaining for some people, but is generally not relevant.

> gzip is fast relative to other compression algorithms

gzip looks fast perhaps compared to "xz -9", but not to anything modern.

Re:MessagePack: like JSON, but fast and small by abjKT26nO8 on Tuesday March 10, 2020 @02:25PM (#22538041)
Your comment could benefit from pointing out the alternatives that outperform gzip.
Re:MessagePack: like JSON, but fast and small by vlovich123 on Tuesday March 10, 2020 @02:04PM (#22537860)
Check out zstd
Re:MessagePack: like JSON, but fast and small by jgalt212 on Tuesday March 10, 2020 @01:47PM (#22537653)
really? what do you suggest that is faster? Our shop has tested a number of compression formats (xv, bz2, gzip, etc) and gzip is good enough and faster than the others we tested.
Re:MessagePack: like JSON, but fast and small by ants_a on Tuesday March 10, 2020 @01:59PM (#22537807)
https://quixdb.github.io/squash-benchmark/

Brotli is better, zstd is faster, lz4 is often good enough and a lot faster.

Re:MessagePack: like JSON, but fast and small by blattimwind on Tuesday March 10, 2020 @01:54PM (#22537751)
The algorithms you name are all rather outdated.

Typical gzip decompression speed is somewhere in the 200-250 MB/s region, compression is much slower. LZ4 for example tends to compress at ~600-700 MB/s, and decompress at several GB/s. zstd is tweakable over a very wide range of ratio-speed trade-offs.

LZMA(2) (xz) is a rather troubled format and should not be used any more. bzip2 has always been slower than gzip with usually marginally better compression. It has been irrelevant for a long time.

Re:MessagePack: like JSON, but fast and small by oefrha on Tuesday March 10, 2020 @02:00PM (#22537822)
> LZMA(2) (xv) is a rather troubled format and should not be used any more.

You mean xz. Not sure where you got the idea that it’s a troubled format, but if you’re talking about the infamous “Xz format inadequate for long-term archiving”, IMO that’s just bzip2 authors taking a dump on xz for no good reason, and fortunately for us it’s bzip2 that’s basically irrelevant today, not xz.

Re:MessagePack: like JSON, but fast and small by gnulinux on Tuesday March 10, 2020 @03:51PM (#22538932)
> It has been irrelevant for a long time.

Funny you say that, my company uses bz2 for compressing pretty much everything.

Re:MessagePack: like JSON, but fast and small by blattimwind on Tuesday March 10, 2020 @05:02PM (#22539650)
And many companies use fixed-width record formats for data exchange... what's your point exactly?
Re:MessagePack: like JSON, but fast and small by gnulinux on Tuesday March 10, 2020 @05:05PM (#22539670)
I guess that it's not irrelevant. Deprecated, old, etc sure, but irrelevant?
Re:MessagePack: like JSON, but fast and small by thedance on Tuesday March 10, 2020 @01:54PM (#22537745)
Well yah, those are all ratio-tuned codecs that are very slow. LZMA beats bzip2 on both ratio and speed so you might as well forget about bzip2 forever. Zstd, snappy, LZ4, or even brotli are probably better choices than zlib for most people. Brotli has LZMA-like ratios at dramatically higher speeds.