logoalt Hacker News

bzip3

167 pointsby toshtoday at 1:35 PM53 commentsview on HN

Comments

altairprimetoday at 2:13 PM

Previously:

(2 years ago, 176 comments) https://news.ycombinator.com/item?id=42899713

(4 years ago, 104 comments) https://news.ycombinator.com/item?id=31324439

8organicbitstoday at 3:34 PM

I was processing compressed .jsonl files recently (JSON lines format). I found that lzma gave a much better compression than gzip or bzip2, which helps for archival costs, but it's challenging to work with as software support is lacking. I do duckdb processing which supports gzip transparently. There's an extension for bzip2, but not for lzma or bzip3.

I ended up using gzip because it's best supported by the software I use and most likely to have support in software I adopt. But it gave the worst compression results of the options I tried. These bzip3 numbers certainly give me FOMO...

show 4 replies
ameliustoday at 2:57 PM

> However, the complexity of the algorithms, and, in particular, the presence of various special cases in the code which occur with very low but non-zero probability make it impossible to rule out the possibility of bugs remaining in the program.

Sounds like perhaps a nice testcase for formalization + AI?

show 2 replies
ottoday at 2:43 PM

The benchmarks are disingenuous, to the point of looking cherry-picked. The block size for bzip3 is set to 512MB, but the window size for zstd is left to its default (8MB I believe for high levels). So in this corpus, which is made up of all versions of Perl source code concatenated, the window is too small to see all the identical files and just match them. Also corpora made out of very long repetitions are pretty much the best case scenario for BWT-based compressors.

If we match the window size of zstd to that of bzip3 we get dramatically different results:

    % gzcat *.gz | time zstd -T8 -16 | wc -c  # baseline
     2819113884
    zstd -T8 -16  2054.50s user 3.47s system 783% cpu 4:22.80 total

    % gzcat *.gz | time zstd -T8 -16 --long=29 | wc -c
     196405076
    zstd -T8 -16 --long=29  1083.06s user 2.41s system 783% cpu 2:18.55 total
Almost 15x smaller than the baseline, and more than 2x smaller than bzip3, also CPU time halves (since long matches are found earlier, so there's less work to do).

(the baseline number is slightly different because I don't have the exact Perl version set used by the author)

Also, in the benchmarks using lrzip, which would make the window size less relevant, zstd is not even compared.

show 6 replies
JdeBPtoday at 3:14 PM

An interesting unintentional benchmark is to go to https://github.com/iczelia/bzip3/releases and see to what degree bzip3 compresses its own release archives; and go to https://github.com/iczelia/bzip3/blob/master/.github/workflo... to see what options have been chosen for the other compressors here.

CodesInChaostoday at 2:45 PM

I think this should include benchmarks zstd with larger windows and long range mode. I wouldn't be surprised if the window they used is smaller than an individual version tar file, which would prevent useful compression.

show 1 reply
red_admiraltoday at 4:22 PM

Why LGPL when the original license is more permissive? (https://sourceware.org/bzip2/manual/manual.html)

show 2 replies
ThiraSofttoday at 4:16 PM

I would be interrested in a comparison with openzl

sergiotapiatoday at 4:09 PM

"DO NOT COMPRESS ANY DATA WITH THIS PROGRAM UNLESS YOU ARE PREPARED TO ACCEPT THE POSSIBILITY, HOWEVER SMALL, THAT THE DATA WILL NOT BE RECOVERABLE."

So why would anybody, hobbyist or enterprise, use this? Or does something older like 7zip also have this caveat that I've never experienced.

show 2 replies
self_awarenesstoday at 3:40 PM

Any relation to Iczelion from the masm32 tutorial?

algorithm314today at 4:13 PM

Bro just decompile agiannis_text

roschdaltoday at 4:10 PM

Imagine bzip4

sedatktoday at 2:20 PM

The latest release is a year ago, the last commit is two months ago, and the build is failing.

The claim “stronger than bzip2” is strange. What does it even mean?

Also, comparing parallel decompression benchmarks with bzip2 instead of pbzip2 seems unfair.

kosolamtoday at 2:07 PM

Impressive compression benchmark. Four times smaller than z standard.

show 3 replies
sylwaretoday at 2:08 PM

Isn't that XZ?

show 1 reply