r/compression • • 2d ago

3P Compressor, a from-scratch compressor that beats xz -6 by 12-17% on Silesia and enwik8, but is slow. Looking for feedback on the benchmarks

Hi r/compression. I'm a solo developer in Nepal and I've been building a compressor called 3P (header-only C++17 engine, CLI, Windows GUI, .3p format). I'd like honest feedback from people who know this field, especially on whether my benchmarks are fair.

What it is: Its a Ai Driven context mixing file compression that does relatevely super good on jpg, right at the optimal boarderline of shannon's entropy limit It also does lossless recompression.

Results (3P v20.0 Max, 8 threads, round-trip verified on every run):

Dataset3P Maxxz -6bzip2 -9zstd -9
Canterbury (2.8 MB)390,523485,828568,890593,615
Silesia (212 MB)43,653,32549,492,07654,595,28659,188,427
enwik8 (100 MB)22,188,83826,665,15629,008,75831,129,515

That's about 12% smaller than xz on Silesia and 17% smaller on enwik8.

The honest downsides:

  • Max runs at roughly 2-3 MB/s, decompression included, and uses about 2 GB of RAM. This is for archival, not interactive use.
  • 3P Fast and Balanced currently lose to zstd/brotli (and Balanced to xz and bzip2) on ratio, and Fast loses on speed too. Balanced especially looks badly tuned, and I'm working on it.
  • The Fast Version is undefeated on the jpg file in compare to recent tools available thus far.
  • My comparison used mid-level settings (xz -6, zstd -9, brotli -q 6). I know xz -9e, zstd -19/-22 --long, brotli -q 11, 7-Zip and zpaq are fairer rivals. I'm re-running those next, so please don't judge me against the weak settings alone.
  • I also have synthetic tests (random data, skewed bits, telemetry), but I don't consider them meaningful evidence, so I'm leaving them out of the headline.

Questions for you:

  1. Which tools and settings must I include to make the comparison credible?
  2. Is there a standard dataset beyond Silesia/enwik8 you'd want to see (logs, binaries, source code)?
  3. Is the speed/ratio trade-off useful to anyone, or is it too slow to matter?

Willing to share benchmarks upon request, Test machine: Windows, Linux 1T core in recent version which is scalable, Happy to take criticism, since that's why I'm posting.

Sorry about not tagging the time in the benchmark, I will post the time in some other time, but here are the speed behcnmark mb/s for encdoing and decoding with single core for all three versions, You can test the compressor through this website http://3.106.223.177/

2 Upvotes

6 comments sorted by

3

u/Worth-Wonder-7386 2d ago

It is not clear what your goal is with this. Is your main goal to be smaller than existing ones or faster? Or a balance? There are different types of algorithms used for different things, but if the intent is to get as small as possible within a reasonable time, try to check what kind of applications would use that. And then see what settings they use for compression. Different software has different needs.

You would of course need to publish open source as well, especially after the xz compromise.

1

u/lowbercoder 2d ago

there are three versions of it, 1. Fast 2. Balanced and 3. Max,. each of these comes with its own trade offs with space vs speed

2

u/atoponce 2d ago

How much of this was vibe coded?

1

u/lowbercoder 2d ago

More then 90 percent is vibe coded, It took me couple of years to get to this benchmark.

2

u/RoyalBlue_Sky 2d ago

A speed/time comparison with the listed compressors is needed. Also, why was 7-Zip left out?

0

u/[deleted] 2d ago

[deleted] — view deleted comment