r/compression • • 1d ago

Wrote a multi-core-native, SIMD lossless compression codec, originally for my engine, but just released to github with permissive license!

Thumbnail
github.com
12 Upvotes

Hey everyone,

I originally built this compression algorithm for my own game engine because I wanted an open-source middle ground between LZ4 and Zstd for game dev workloads (paks, streaming assets, snapshots, small netcode packets). Full disclosure: I have background in network and low-level optimization, and I used AI to help me bridge the domain gap in compression itself while steering the architecture, profiling, and verifying everything on real hardware.

It turned out useful enough that I split it into a standalone zero-dependency library + CLI in both C11 and native Odin (100% wire-compatible, Apache-2.0, Linux/macOS/Windows):

https://github.com/JoseIgnacioAragon/axz

Quick numbers on the standard 202 MiB Silesia corpus (Intel Core 7 240H, AVX2, in-memory):

  • AXZ -1: 2.21x | 3.36 GiB/s 1T / 17.0 GiB/s 16T decode
  • AXZ -5: 2.90x | 3.24 GiB/s 1T / 17.0 GiB/s 16T decode (matches Zstd -1 ratio while decoding ~2x faster 1T and ~11x faster 16T, since standard Zstd frames don't parallelize decode)
  • On a 32T Ryzen 9 7950X (AVX-512VBMI2) it scales up to 58 GiB/s multi-core decode.

It's multi-core native in the wire format, skips bit-level Huffman/ANS in favor of SIMD planar tables, and includes 11 per-chunk pre-filters (RGBA8, Float4_Xor, Delta, SoA, etc.) plus 8-byte micro-packets + 8 KiB dictionaries for small RPC/netcode payloads. ARM64 NEON isn't in yet (runs scalar fallback for now), and -5 is intentionally slow to encode for offline asset cooking.


r/compression • • 1d ago

What are the best compression (lossless) algorithms for hardware implementation without taking too much of area and power. ?

1 Upvotes

Basically lz4 depending on the context the buffer memory changes. Is there a way where you can save the area of the hardware of algorithm and also increase the speed.


r/compression • • 2d ago

misa77 0.9.0 : 2-3x faster decompression than zstd with similar ratios

Thumbnail
github.com
20 Upvotes

r/compression • • 1d ago

Analogue vs digital: sampling, bits and aliasing explained with two experiments

Thumbnail
semenklenov.com
1 Upvotes

Film or digital? Vinyl or streaming? Beginners often hear these debates as matters of taste. Under the taste there is a precise piece of science: how a continuous signal from the real world becomes a list of numbers. My book covers both film and digital recording, and I think every visual artist should understand the step between them. In this article I explain it with two small experiments.

Analogue and digital in one paragraph

An analogue signal is continuous: the voltage from a microphone, the density of silver in film, the light falling on a sensor. It can take any value at any moment. A digital signal is a list of numbers. Getting from one to the other takes two separate steps, and each has its own error:

  1. Sampling: measure the signal at regular moments (in time) or positions (in space: pixels).
  2. Quantisation: round each measurement to the nearest of a limited set of levels (bits).

Step 1: sampling and the Nyquist limit

The sampling theorem, from Nyquist (1928) and Shannon (1949), says that a signal can be reconstructed exactly from its samples if it contains no frequencies above half the sampling rate. If it does, the high frequencies do not disappear. They fold back and pretend to be low frequencies. This is aliasing.

Experiment A. I sampled a 900 Hz tone at 1000 samples per second, below the required 1800. The spectrum of the samples shows a peak at exactly 100 Hz. The samples describe a slow wave that never existed (see the cover).

You know this effect from film: the "wagon-wheel effect", where spokes seem to turn backwards at 24 frames per second. In images it is moiré on fabrics and fine grids. Cameras fight it with an optical low-pass filter, and 3D renderers with anti-aliasing: several samples per pixel instead of one.

Step 2: quantisation and bits

Every extra bit doubles the number of levels and lowers the rounding error. For a full-scale sine wave, theory predicts a signal-to-noise ratio of about 6.02 × N + 1.76 dB for N bits.

Experiment B. I quantised a sine wave to 4, 8, 12 and 16 bits and measured the real error:

BitsLevelsMeasured SNRTheory
41626.2 dB25.8 dB
825650.0 dB49.9 dB
124,09674.0 dB74.0 dB
1665,53698.1 dB98.1 dB

Every bit adds about 6 dB. That is why 8-bit images show banding in smooth skies and gradients, while 10-, 12- and 16-bit files and RAW photos give room to grade without stepping. It is also why masters for colour grading are kept at higher bit depth and converted to 8 bits only for delivery.

So is analogue "better"?

Not automatically. Analogue media have their own limits: film grain, tape hiss, generation loss with every copy. A digital system that samples fast enough and uses enough bits can exceed the useful precision of most analogue media, and it copies without loss. What people love in film is often real, though. It comes from grain structure, highlight roll-off and colour response, not from digital being "missing something". Many of these qualities can be measured and even modelled.

What this means for my work

In SMART ONE, sampling and quantisation are where image analysis starts. Pixel grids, compression blocks and bit depth leave measurable patterns, and any honest analysis has to separate them from the content of the scene. In 3D work, aliasing is the reason to render with enough samples per pixel and keep textures at a resolution that matches their size on screen.

If you are just starting

  • Remember two rules: sample at more than twice the highest frequency, and every bit adds about 6 dB.
  • Work in 16-bit or 32-bit float when you grade or composite. Export 8-bit only at the end.
  • When you see moiré or banding, you are looking at sampling or quantisation, not at "bad quality" in general.

Reproduce it

```python
import numpy as np
t = np.arange(220)/220; x = np.sin(2np.pi997.3*t)
for N in [4, 8, 12, 16]:
step = 2/2**N; q = np.round(x/step)*step
print(N, 10np.log10(np.mean(x***2)/np.mean((x-q)*2)), 6.02N + 1.76)
fs, f = 1000, 900; s = np.sin(2np.pif*np.arange(fs)/fs)
print("alias at", np.argmax(np.abs(np.fft.rfft(s))), "Hz")
```

References

  • Klenov, S. (2026). Technical Foundation. Filmmaking: The Cinematographer's Handbook (v1.1). Zenodo. https://doi.org/10.5281/zenodo.24325834
  • Nyquist, H. (1928). Certain topics in telegraph transmission theory. Transactions of the AIEE, 47(2), 617–644.
  • Shannon, C. E. (1949). Communication in the presence of noise. Proceedings of the IRE, 37(1), 10–21.

SEMEN KLENOV · Visual science for beginners. Drafted with AI assistance; experiment code and numbers checked by the author.

---
Originally published at https://semenklenov.com/journal/analogue-vs-digital-signal/


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

2 Upvotes

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/


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

Thumbnail reddit.com
0 Upvotes

Tested on three version of it, 1. Fast, 2. Balanced, and 3. Max


r/compression • • 2d ago

Compression utility that can shrink movies

0 Upvotes

Is there any compression utility that lets me losslessly shrink movies without re-encoding them? I have movies in mkv, 99% are blu-ray remuxes that are large in size and want to archive them on external drive. I tried archiving them in 7zip and winrar, which did basically nothing...


r/compression • • 5d ago

Why not to use 254**3 colours instead of 256**3 (Python 3)

0 Upvotes

Hi,

If we use my schema -> possibilities 01111111 128 10111111 64 11011111 32 11101111 16 11110111 8 11111011 4 and 1111110 1111111 (2). we could have in practice not theory same length of the message or shorter plus 8 bits to both messages that start with bit 1 and rest fill with bit 0 like 00000001.

What do you think, let me know.


r/compression • • 6d ago

I love mathematics, vibe coded a codec after an idea struck me, and it outperforms leading competitors in my tests. How do I validate and license it?

Thumbnail reddit.com
0 Upvotes

r/compression • • 7d ago

Lossless compression of LLM weights below their per-tensor entropy: Qwen3.8-27B BF16 at 10.43 bits/weight, bit-identical (open codec + paper)

Thumbnail
reddit.com
1 Upvotes

r/compression • • 8d ago

Zstandard v1.6.0 released

Thumbnail
github.com
15 Upvotes

Reading the release notes, it sounds like Meta was initially planning on this coming out later, but a vulnerability leading to a CVE prompted them to push it out early.

  • Decompression performance improvements for 64-bit ARM.
  • Compression performance improvements for CPUs with SVE2.
  • Performance improvements on RISC-V with RVV.
  • Some command line adjustments and minor API changes.

r/compression • • 9d ago

Neuralzip: lossless neural text compression, including model weights in the archive

3 Upvotes

Disclosure: I used AI assistance for development

I built Neuralzip, an open-source Python library for lossless text compression using a small neural model and arithmetic coding.

The model is trained on the input text. Its weights are stored alongside the encoded stream, metadata, and checksum in one archive. Decoding uses the saved model without retraining.

Results from two saved research models:

InputOriginalgzip-9Neuralzip
5 book collection3,120,899 B1,191,527 B791,134 B
Alice in Wonderland151,094 B53,249 B63,048 B

The five-book archive is 33.6% smaller than gzip-9. Gzip wins on Alice, and PPMd produced a smaller five-book archive at 763,603 bytes.

Neuralzip sizes include the model weights and complete encoded stream. Shared decoder/runtime installation sizes are excluded. Both archives were decoded and compared with the original bytes.

Encoding requires training, decoding also evaluates the model, and both are much slower than conventional codecs. Small inputs can grow because of model overhead. These measurements use saved research checkpoints; fresh training runs can differ.

python -m pip install neuralzip
neuralzip encode notes.txt
neuralzip decode notes.txt.nzip

Source · PyPI

I’d appreciate feedback on the archive accounting, implementation, and which datasets and baselines would make the next evaluation useful.


r/compression • • 9d ago

New MP3 Encoder "Helix Ultra" beats LAME MP3.

5 Upvotes

Hi.

It's a listening test comparing the following MP3 encoders @ 192 kbps:

LAME 4.0 -V2

Helix -V110 -HF2 

Ultra  -V110 -HF2 -E1Z . https://github.com/IgorCv2/hmp3/releases/tag/ultra-poc1


r/compression • • 9d ago

fineseed 100% Lossless compression for Al models (SafeTensors, GGUF, ONNX) like .zip for models

Post image
2 Upvotes

r/compression • • 9d ago

How do I accomplish this level of compression? (With keeping dates the same and relatively easy)

Thumbnail
gallery
0 Upvotes

so I use my Meta glasses a lot with the amount of sports I play but I don't understand this:

How does such a short video (10-20s) take up the same amount of storage as an edited video (2:59s) I know Meta glasses/Phones might take videos at a high level of encoding but in reality its still 1080p so when I edit all of these videos together in CapCut (Theres enough to be said there so please dont roast me...) and then exported 1080p 3 minute video comes out to literally the same if not less storage on my disk I just dont understand how it works. I do understand that it reduces the quality of the videos a little bit but not astronmically enough bitrate wise to lower the storage by 2000%

And lastly, BECAUSE I have so many videos I'd LOVE to compress ALL of them this small so that they take up literally 10-20x less space on my phone/PC/Icloud photos (Preferably with keeping the dates/time the same, that way I know I can sort it based on date)

how is this 5s video ~20mb more than this 37s video

this 3 minute video is only double the size of the 5s video


r/compression • • 10d ago

Comparing GPT-2 Large vs Qwen3.5-9B-Base as lossless 62-bit arithmetic coders (560 B -> 53 B vs 343 B zlib -9)

Thumbnail
gallery
8 Upvotes

Built a local Python + llama-cpp-python tool (runs 100% locally on an RTX 4060, not a hosted web service) to test 62-bit integer arithmetic coding using local GGUF language models as next-token predictors and verify exact SHA-256 round-trip decoding.

On this 560 B test text (US Constitution preamble + a fresh paragraph about information theory), zlib -9 gets 343 B, gpt2-large gets 62 B (0.886 bpb, 97.88% coder efficiency), and Qwen3.5-9B-Base gets 53 B (0.757 bpb, 97.81% efficiency).

The token-level -log2(P) heatmap makes pretraining memorization vs real generalization pretty obvious: the preamble is almost solid green for both models while the unseen second paragraph turns orange/red.


r/compression • • 12d ago

Tencent gave Google's Guetzli a GPU. I volunteered to keep it alive. v3.0.0 is out.

20 Upvotes

You may remember Guetzli: Google's perceptual JPEG encoder from 2017. It makes JPEGs 20–30% smaller than libjpeg at the same visual quality. It does this by running Butteraugli, a model of the human eye, over and over until the eye stops complaining. It encodes at the speed of continental drift and eats about 300 MB of RAM per megapixel.

Some engineers at Tencent took pity on it and wrote CUDA and OpenCL backends. That's the hard part, and it's their work. I'm just a volunteer who adopted the fork after the original authors. I just shipped v3.0.0: https://github.com/doterax/guetzli-cuda-opencl

What happened:

  • The OpenCL backend works again. Before, --opencl on a 12 MP photo produced a 47 KB JPEG instead of a 2.9 MB one. Technically excellent compression. Not ideal for anyone who wanted to look at the photo. OpenCL, CUDA and CPU now agree with each other.
  • Faster, same output. On an RTX 3060 Laptop, a 12 MP photo went from 35.0 s to 20.9 s with CUDA. On the CPU, a 1 MP PNG went from 65.1 s to 44.3 s. Still Guetzli, just a bit less glacial.
  • Fixed bugs older than some of your codecs. One frequency-masking bug had been there since 2017. Another one, from 2025, sent 4:2:0 chroma changes to the wrong block. With the fix, 4:2:0 photos come out 0.4–1.8% smaller. Free bytes from removing bugs.
  • GPU errors no longer crash it. If the GPU fails, the image is encoded on the CPU and you get one polite message instead of abort().
  • --check mode runs the GPU and the CPU for each stage and reports every disagreement in the last float digits. For people who love -ffast-math and don't trust it.
  • Under the hood: rewritten in C++20 with CMake. The kernels ship inside the binary. CUDA is loaded at runtime, so it still starts on machines with no NVIDIA driver. Builds for Windows, Linux and macOS (arm64).

Does the world need a faster encoder that is still about 1000× slower than mozjpeg? No. Did I enjoy chasing a float that differed in the last bit between CUDA and OpenCL? Also no. But it's done, and it's free.

Benchmarks, flames and "just use JPEG XL" comments are all welcome below 😂

UPD

Thanks for the questions. They were good enough that we stopped arguing and measured. Short version: you were right about jpegli.

Setup. Guetzli vs libjpeg-turbo 3.0.4, MozJPEG 4.1.5 and jpegli (libjxl 0.11.1) on 63 images: Kodak, real screenshots, rendered text/code/UI, line art and comics, photos with heavy grain, plus a set of production game art, game UI screenshots and drone photos. Each encoder's quality setting is swept. Each image gets the size each encoder needs to reach a target score, compared only where all four reach it. libjpeg-turbo and MozJPEG also get a 4:4:4 sweep, so their 4:2:0 default doesn't handicap them on text.

Three metrics: ssimulacra2, the current butteraugli from libjxl, and the 2017 butteraugli that Guetzli actually optimizes (the one behind Google's "20-30%").

"Jpegli will do almost the same instantly": it does better. At equal quality jpegli was the smallest on 57 of 58 images, about 14% below libjpeg-turbo at ssimulacra2 85. It wins even on Guetzli's own butteraugli (−23% vs −5% for Guetzli). And it runs at about 57 ms/MP, against 2.7 s/MP for Guetzli on our CUDA path (27 s/MP on CPU).

"How does the size compare to MozJPEG / jpegli?" Relative to libjpeg-turbo, at the same score:

(MozJPEG is tuned for mid quality; up here it loses to plain libjpeg-turbo, which matches what others have reported.)

"20-30% vs libjpeg isn't impressive / photo-tuned models fall apart on line art, text, grain / you'd need a large library": partly yes, partly no. Against a modern libjpeg-turbo with its best chroma mode, Guetzli's gain shrinks to about 5-10% on photos, and only on its own metric. On ssimulacra2 it's larger than libjpeg-turbo, and that gap is widest on screenshots and text (+9-40%). So Guetzli's advantage looks more like fitting one metric than a general improvement. jpegli's lead, though, held in every group: text, line art, game UI, aerial. The one group where it shrank was grain (4%), where every encoder struggles.


r/compression • • 12d ago

NibbleZip – a free Windows tool that compresses into 7z/ZIP while freeing the originals' space as it goes (and extracts the same way). Beta, looking for testers.

0 Upvotes

Full disclosure, since it matters for a tool that deletes files: the code was written by an AI (Claude, by Anthropic). The idea, design and hands-on testing are mine; I'm not a programmer and haven't reviewed the code line by line. That's why the design doesn't rely on trusting the code: nothing is deleted until it has been read back and verified, and the test suite kills the program at every stage of every kind of job (hundreds of scenarios) to prove it recovers. The tests, the source and a write-up of how it works are all on GitHub.

So Please - DO NOT USE THIS ON DATA THAT MATTERS AT ALL! I AM NOT RESPONSIBLE FOR ANY DATA LOSS!! I've used this on my own files so far (on things I'm okay losing - game installs, copies of files, etc.) and everything seems to work good on my end - I tried a few public zip tests and hashes matched too.

After I started using HatchZip, I thought it was such a good idea, but could we have a similar tool to zip files instead?

So the idea sprouted from the idea that compressing normally needs room for the files AND the archive at the same time. When a drive is nearly full, you can't compress the very things that are filling it. Same in reverse when unpacking a huge archive, and I wondered how can we use as little space as possible?

NibbleZip compresses a chunk, writes it to the archive, reads it back from disk, decompresses it and compares it byte for byte with the source, records it in a journal, and only then frees the space of that chunk of the originals. Big files are released from the inside as they go (NTFS sparse files), so free space actually rises while it works. Extraction does the reverse: the archive gives its space back as verified files come out.

In my own testing, a 29.5 GB game folder became a 9.7 GB 7z on a drive with about 32 GB free, without ever needing room for both.

- Normal 7z and ZIP output that 7-Zip, WinRAR etc. open. No custom format.

- Stop, crash or power cut: it resumes where it left off, or a half-processed file can be put back exactly as it was.

- One archive, one per item, or one per file (e.g. a ROM folder where every game becomes its own zip), and split parts (.001, .002...).

- Untick one box and it's an ordinary archiver that deletes nothing.

Again, this is a beta. Please try it on copies of data first. I'd love reports of anything odd: different drives (exFAT, USB, network), huge file counts, very large single files, archives made by other tools.

GitHub (source, download, how it works): https://github.com/cloudhaacker/NibbleZip

VirusTotal scan of the release: https://www.virustotal.com/gui/file/a4bfb46971d3b5b0151b3a31ea26aa5a4aa3b02c57e17888e65f32c7e8d2f0b2?nocache=1

For some reason I'm getting flagged by Kaspersky - VHO:Rootkit.Win32.Convagent.gen - Acronis (Static ML) - Undetected

If you don't trust my builds, you can analyze the code yourself and build it, my last version didn't pop this so I'm pretty sure it's a false positive.

I'm open to suggestions, and will listen to any constructive feedback, but I won't guarantee how long things might take to fix/change - I just started making this for fun and to see what Claude could do with this. Thanks for checking it out, and if you can think of somewhere else it might be good to post, let me know or share with others! Thanks!

Free, MIT licence, no telemetry, nothing to install.


r/compression • • 13d ago

exact-gpu-jpeg: CUDA JPEG decode/encode that’s byte-identical to libjpeg-turbo and Pillow

Thumbnail
reddit.com
4 Upvotes

GPU JPEG decoders are fast, but their pixels differ from the CPU libraries'. On 102 public test images, nvJPEG matched libjpeg-turbo on none of them, by up to 110 levels at 4:2:0. That quietly breaks reproducible ML pipelines, test baselines and caches whenever decoding moves between CPU and GPU.

exact-gpu-jpeg decodes on the GPU and returns libjpeg-turbo's pixels byte for byte (accurate IDCT, fancy upsampling), and its encoder writes the same bytes as Pillow. Anything it can't reproduce exactly, progressive files for example, goes to libjpeg-turbo itself, so the output is always the reference.

On a 2016 GTX 1070: a 30 MP camera photo decodes in 11.3 ms, against 185 ms for libjpeg-turbo on one core and 164 ms for nvJPEG on the same card. Batches of small images: 7,310 images/s. Encoding: 5.5x faster than Pillow with identical files.

Where it loses is listed near the top of the README: one small image at a time, small encodes against 8 CPU threads, progressive files. Everything so far is from one machine, so results from other GPUs are very welcome: `python bench/reproduce.py --quick`, and there's a pinned issue for them.

The parallel Huffman stage (Weißenberger & Schmidt's self-synchronising method) is drawn in docs/huffman-sync.md, and there's a white paper in docs/ covering the method, the evidence and the limits.

https://github.com/mrluker/exact-gpu-jpeg


r/compression • • 14d ago

ctLame: LAME’s VBR encoder on all cores, byte-identical output, 14x faster on 8 cores

10 Upvotes

ctLame 0.3.0 is a C++ port of LAME 4.0's VBR encoder (-V) that encodes a single file on all cores and writes exactly the same bytes as lame.exe.

On an i9-11900K (8C/16T) it encoded 45 h of CD audio (-V 4) in 85 s; lame.exe took 1195 s. All 343 files were bit-identical.

LAME is sequential by design: psychoacoustic state carries from frame to frame, and so does the bit reservoir. ctLame splits each frame into stateless parts (FFT, MDCT, quantization search, Huffman), which run for many frames in parallel, and short serial steps in frame order.

It's the successor to fpMP3Enc (2008): https://hydrogenaudio.org/index.php/topic,73790.msg649414.html

How it's built: https://www.thinkmeta.com/concurrenttasks/task-based-programming/ctlame

Source (LGPL), binaries for Windows/Linux x64, benchmarks: https://github.com/ThinkMeta-com/ThinkMeta.ConcurrentTasks.Samples/tree/main/ctLame

Numbers from other CPUs welcome.


r/compression • • 14d ago

OXN - open-source neural image codec with JPEG XL / AVIF / WebP comparison (Kodak holdout, PSNR + MS-SSIM + LPIPS + speed)

2 Upvotes

Hi!

I’m not a pioneer in this field - you can find both free and commercial projects on the internet (https://github.com/adimalkar/Neural-Image-Compressor , https://ai.nero.com/image-compressor).

Some time ago I shared my neural image codec here https://github.com/ageMLex2021/oxn and got fair criticism :PSNR alone is not enough, and I needed to compare against JPEGXL and AVif. So I did the homework. Setup: Kodak kodim21-24 (these 4 images were never used in training), matched bitrates 0.15-0.30 bpp, metrics PSNR, MS-SSIM and LPIPS, plus encode/decode times. Full tables, methodology and a visual crop comparison: https://github.com/ageMLex2021/oxn/blob/main/BENCHMARKS.md

formats comparison

Short version of what I found:

  • vs JPEG: OXN wins by +4-5 dB PSNR with no blocking artifacts, and by a wide margin on MS-SSIM and LPIPS.
  • The size angle (same data, read backwards): to match OXN's PSNR at 0.15 bpp, JPEG needs about 0.30 bpp - a 2x bigger file. To match OXN's LPIPS at 0.15 bpp, JPEG XL does not get there even at 0.30 bpp.
  • vs JPEG XL: JXL is slightly ahead on PSNR at matched bitrate, but OXN is clearly better on LPIPS at low bitrates (0.20-0.26 vs 0.30-0.32) - it keeps textures more natural where JXL tends to smooth them out.
  • vs WebP: WebP is ahead on PSNR, OXN is comparable or better on LPIPS at <=0.20 bpp.
  • vs AVIF: AVIF wins overall on this set.
  • Speed is the honest price: 30-300x slower encode and ~50x slower decode than the C reference encoders (0.3 s vs 1-60 ms for a 768x512 image). It is a Python/PyTorch research codec, so think archiving and batch use, not realtime. It is lossy, experimental, MIT licensed, and the trained weights are in the repo, so you can reproduce everything yourself. How it works in one paragraph: the image is split into 16x16 patches, a transformer autoencoder compresses each patch to 24 numbers, every patch picks its own quantization scale from a small ladder (adaptive rate), and a hyperprior predicts the value distribution per token so the rANS entropy coder only stores the residuals. Happy to answer questions and to run more tests if you have suggestions .

r/compression • • 14d ago

Does anyone know what happened to the 55.4 Yottabyte ZIP Bomb?

1 Upvotes

A user called FinderFire2 posted something called funny.zip, supposedly around 2.6 MB and claiming to expand to 55.4 YB.

Has anyone ever found the actual file, downloaded it, or tested its contents? Is it real, or was it just a joke?

I'm trying to find out what happened to the original file. Any information, archives, or screenshots would be appreciated!


r/compression • • 15d ago

QLIC Lite 1.0 release - JXL density at 41x the speed

Thumbnail qlic.pages.dev
8 Upvotes

QLIC Lite is a lossless codec and these were single threaded on a 9950x3d on logical CPU 2.

QLIC Lite on average encoded at 75.67 MP/s and decoded on average at 247.81MP/s. Across the entire corpus it gets a total file size at about JXL effort 7 density. JXL e7 was 0.111% larger on the 3200 image benchmark and funnily enough, 0.002% larger on the smaller 2400 image benchmark for the RGB codecs. JXL e7 encoded at 1.83 MP/s and decoded at 10.57 MP/s. Libpng effort 1 encoded at 42.67 MP/s and decoded at 123.78 MP/s.

That makes QLIC Lite: 41x faster at encoding than JXL e7. 23x faster at decoding than JXL e7. And damn near exactly 2x faster at decoding than PNG (in this benchmark but still)

QLIC Lite supports up to 10-bit HDR and RGBA of course.

QLIC Lite also used less ram than JXL did overall in my testing.

I'd like if you guys could test out QLIC Lite, tell me of any glitches, independent benchmarks, oh and especially Linux, I couldn't test on a real Linux machine, I know, I know, not a real engineer I don't use Linux, but anyway. Anyone with a Linux machine I'd love if you could rip apart my codec to shreds and tell me what happens so I can hopefully fix it.

I'll also warn anyone on older machines you WILL get different results if your device is too old for avx2. It'll need to fallback to sse4.2 and popcnt, which keeps most of the speed, but it'll lose a bit of it. If your device is too old for those, I'd, admittedly not recommend QLIC Lite as much. It's still formidable overall, but, portable C isn't nearly as fast as sse4.2 with popcnt and avx2.

That's all.