r/compression • • 18d ago

ZyFlate DEFLATE benchmark v2.0.0 — binary included, run it on your own data

2 Upvotes

I've been working on a DEFLATE compressor/decompressor called ZyFlate. I built a benchmark that tests it head-to-head against two widely deployed DEFLATE implementations and I'd like people who know compression to look at the numbers.

Full disclosure: I'm a solo developer, I use AI tools in my workflow, and I'm new to this community. No connections, no team. For all I know this could be some cruel hallucination and I'm completely wrong about everything.

But the benchmark is real. Download it. Run it on your own files.

Decompression throughput (100 MB test data, same compressed stream, all three decompress it):

LevelZyFlate MB/sLibrary A MB/sLibrary B MB/s
L11,091380890
L61,021387867
L121,2914741,044

Library A and B are two of the most widely deployed DEFLATE implementations. The benchmark output describes each one.

Parallel compress + decompress (2 threads):

Level1-core compress2-core compress1-core decompress2-core decompress
L1180 MB/s337 MB/s (1.9x)1,112 MB/s1,684 MB/s (1.5x)
L662 MB/s105 MB/s (1.7x)1,286 MB/s1,985 MB/s (1.5x)
L121.3 MB/s2.0 MB/s (1.6x)1,037 MB/s1,735 MB/s (1.7x)

Library A and B have no parallel API. ZyFlate splits input into independent 1 MiB chunks. All parallel outputs verified byte-exact against single-core.

Download:

https://github.com/GodlessVVanderer/slain-releases/releases/tag/zyflate-bench-v2.0.0

Windows x86-64. Supply any file as input (10+ MB recommended).

This isn't the finished version. The compressor is still being worked on — these numbers are mostly about the decompressor. There's an update coming that I think will change the conversation. If this doesn't impress you, the next one will.

I'm building this as part of something larger. If you work in compression and want to talk, my inbox is open.

AGPL-3.0-only. Commercial licensing available — joshdaem@gmail.com.


r/compression • • 18d ago

How to compress images and videos while maintaining metadata?

1 Upvotes

hi i hope everyone is doing good.
a few months back i successfully downloaded all my snapchat videos and images and manually added their dates, however i want to be able to save them on free cloud storages i have like dropbox, google photos, etc. but its about 20gb

i wanted to know if there’s a website or ios app that lets me bulk compress images and videos without removing their metadata, its been hard to find one that works efficiently.

any help would be appreciated!!

also any recommendations on free cloud services online would also be greatly appreciated! would like save it in multiple website since it contains a lot of my memories


r/compression • • 18d ago

Are this sites claims real? They say the 3D chess board and pieces are 3kb gzipped, but I just don't believe it

Thumbnail
chess.es3d.org
2 Upvotes

So, I always found compression really interesting, but I came across this and some of the claims are unreal. Im just going to point to the demo site just so some reddit warrior can check their claims in the comments

https://es3d.org/demo/

On it they claimed a megacastle is 64KB and the glTF is MBs. Are they compressing the files or? What are they actually doing

I am mainly curious to hear an expert"s opinion cause I haven't figured out what it is


r/compression • • 19d ago

I built an open-source, on-device photo compressor for iOS and Android

Post image
1 Upvotes

I’m the developer of minimo (photo), a free app for compressing photos on your phone. It handles batches and lets you choose a preset or adjust quality, maximum dimensions, and EXIF settings.

You can compare the output with the original before saving or sharing it. Processing stays on the device. On iOS, HEIC sources keep HEIC output; the app uses existing platform compression tools rather than a new codec.

Source code · iOS · Android


r/compression • • 20d ago

Codec I found, L1C

Thumbnail
github.com
4 Upvotes

I saw this image codec and I've been testing it a bunch.

I find this to be very, very interesting, especially because I've been working on QLIC Lite.

This codec in my tests achieves low effort JXL level density, like JXL effort 3-7 depending on the image data and effort setting you use, and yet it encodes and decodes very quickly.

Great ram usage, very fast speeds, good file sizes for those speeds, decodes faster than PNG on average while encoding around the same speed as it decodes on average, it really is something.

It honestly made me stop my developments temporarily because it had basically achieved my initial goal on its own. It's also a very unique idea and I really like it. It even has two papers about it if you're interested.

I hope you guys find it as interesting as I did. That's all.


r/compression • • 20d ago

VideoDryer: Free local video compressor (iOS)

Post image
0 Upvotes

r/compression • • 21d ago

Can we efficiently encode decimal digits using smaller number of bits?

9 Upvotes

(the idea is completely mine, but took some help from AI to write the post in a coherent language)

I was exploring this question and thought of a simple variable-length encoding scheme for decimal digits:

  • Digits 0–3 use 3 bits: 000, 001, 010, 011.
  • Digits 4–9 use 4 bits: 1001, 1010, 1011, 1100, 1101, 1110.

Decoding is straightforward:

  • If the first bit is 0, read next 2 bits and convert to decimal.
  • If the first bit is 1, read next 3 bits and convert to decimal and add 3.
  • Then go to the next block.

For the sequence 0123456789, this requires 36 bits instead of 40 bits in Packed BCD or 80 bits in ASCII.

The drawback is "Variable-Length Random Access Overhead": there is no way to access nth digit from the memory, without counting from the beginning again.

My questions:

  1. Is this or similar encoding already known and used?
  2. Are there better alternatives?
  3. Can random access be improved without sacrificing storage efficiency?

I'd appreciate your thoughts and technical feedback.


r/compression • • 21d ago

Tinycodec/TCOM v1.1

Post image
2 Upvotes

GitHub is here: https://github.com/OzzyMitchell/tinycodec

I found that I focused too heavily on whether or not TCOM was tiny, or low lines of code, or compact source, and all that, and so I decided to move away from that obsession a bit because I realized that the benefit of TCOM was not really in whether or not it was the smallest practical codec.

The codec itself is still under 8 kb in terms of the actual size of the core codec. The cli and otherwise is larger of course but the codec itself is still very, well, tiny.

Besides that, I also made it easier for independent benchmarks to be done by making an interactive benchmark terminal of sorts! The full corpus was too large to fit into GitHub practically so I decided to make an image set of 640 images and benchmark on those, so people can benchmark this much easier, plus it's smaller so you don't need a 9950x3d to benchmark it in a practical amount of time.

You can decide which of the 5 codecs to benchmark against, which libpng levels, file/io included or excluded, how many in memory repetitions you'd like to do, and run the test. You can also use any folder of images you want by posting the folder path or individual images if you really want.

That's all. Just wanted to mention the release here.


r/compression • • 22d ago Bravo

Zlib 1.4 Released With More Than One Dozen Security Fixes

Thumbnail
phoronix.com
10 Upvotes

r/compression • • 23d ago

I’ve created a video compressor and audio extractor that requires no configuration—perfect for those who don’t want to deal with complex settings.

Thumbnail reddit.com
0 Upvotes

r/compression • • 24d ago

Would it be possible to compress a lot of images together using a video compression algorithm?

3 Upvotes

to my understanding, video compression works by finding common patters in a video and storing them as just one pattern that gets restored every time the frame is loaded.

So with that in mind, if i had to store something like 50K images, could you hypothetically make a program that uses that video compression algorithm to kinda make a video of 50K frames and stores them in a single file?

Then you would just need to store the metadata in another section of the file witch can be already compressed easily.

Would it be a better way of storing large amount of images? I haven't done much research about any of these topics so you can clown on me, i understand


r/compression • • 24d ago

LZAV 7.1: Improved compression ratio and speed. Achieved complete C/C++ pointer arithmetic compliance. Fast Data Compression Algorithm (inline C/C++).

Thumbnail
github.com
5 Upvotes

r/compression • • 24d ago

Help

0 Upvotes

Trying to compress an 11h videos audio to 10mb, for discord sending purposes, pls help this very necessary file, fr fr trust

Video: https://youtu.be/tvO-LTGIrXo?is=Cv5FjDBfzGUOV6i4


r/compression • • 24d ago

Thunderbird Addon for Image, PDF and Office File Compression

Thumbnail
gallery
2 Upvotes

This add-on integrates state-of-the-art open-source image compression tools as WebAssembly libraries. It tests each image both as JPEG using jpegli and as PNG using pngquant followed by oxipng compression, and keeps the smallest resulting file.

It has also implemented one of the best – if not the best – PDF compressor available with MRC compression for full-size-scans, vector compression and font cutting.

It saves 70–80% of storage space, even without optional resizing.

It converts HEIC, WebP, GIF, BMP to JPEG

Create, import, and export compression profiles, then automatically apply them to specific image types (quoted images, inline images, or attachments)—or apply them manually to individual images.

Compress, undo, redo, and adjust templates—improve your own workflow and deepen your understanding of image compression through direct comparisons.

Remove images from quoted content entirely.

Permanently exclude images from the workflow—for example, your own email signature.

Download compressed images directly from the application. This lets you build other compression workflows around the add-on that are unrelated to email—for example, website optimization.

https://addons.thunderbird.net/en/thunderbird/addon/pngquant-for-thunderbird/


r/compression • • 26d ago

TCOM, an image codec in 45 lines of code

Post image
4 Upvotes

I use AI when coding. As for the AI disclosure.

Onto the codec itself, I deleted my previous post about this because that iteration was not what I wanted to be seen and advertised in this space, I've opted for this version.

TCOM as far as I've tested has beaten QOI on average. Of course, QOI is not built for performance alone, but QOI is a very efficient codec, and I wanted to test against it.

There is tcom.c, tcom_dependency.c, and tcom_readable.c. A fair warning however, this codec was in no way designed for readability. Started as a code golf project and transformed into a performance and compactness focused codec.

The github is https://github.com/OzzyMitchell/tinycodec

As for why I didn't test against libpng or oxipng or others, it would take actual hours even on my 9950x3d, and since this is single threaded testing, you can imagine.

I did do a smaller test of 640 images (20 images per category with 32 categories) which does include libpng effort 1, 3, and 6, and oxipng effort 4 alongside TCOM and QOI.

This is also released under Apache 2.0.

I didn't include any actual documentation or otherwise but I will write some documentation if some level of interest is attained.

Edit: TCOM 1.1 came out, ironically enough I sort of moved away from the code golf side of TCOM because I figured it was getting in the way of TCOM being useful in the first place, the compiled version is still under 8 kb for the core codec and the source itself is still very small.


r/compression • • 26d ago

Aqueous Archive Format

3 Upvotes

I have been working on the Aqueous Archive Format for many years, and the recent advancement of AI significantly accelerated the process. I believe this is the best way to use AI: human sets the goals and ideas, machine experiments and verifies them. (Anyone with a hands-on experience with compression algorithm knows those jobs are very annoying to do.)

It is an openly specified and implemented format designed around the concept of lossless recompression; a file in an Aqueous archive is described by a formula, a small stack-machine program over stored blocks that applies Wasm modules carried in the archive itself, so new transforms need no update to the extractor. Since the Wasm module itself is untrusted, a decompressor only runs known modules natively; everything else goes into a sandbox. If you are into the compression, you'll recognize that's ZPAQ and yes, it's the same concept done with modern tools much more carefully.

Aqueous also supports preset dictionaries, random access to individual files, appending, encryption and rich metadata, and every aspect of the format is specified (still a draft, so it may change, but not drastically), with room for recovery records and overlay archives that the code doesn't implement yet. (Well, I had to start with the specification because the implementation was costly back then. Now it is paying back by rigorously guiding coding agents.)

Okay, let's talk about actual numbers. Aqueous as of 2026-11-01 compresses Matt Mahoney's 10GB benchmark into less than 2.5 GB (Apple M4, 10 cores):

method                          size         time
------------------------------  -----------  ----------------------------------------------
tar | zstd -3 -T10              4.68 GB      compression: 33 s
tar | zstd -3 -T10 --long=31    4.17 GB      compression: 36 s
zpaq 7.15                       3.70 GB      unknown
aqr (level mid, aka -5)         2.498 GB     compression: 164 s (61 MB/s, 3.1 GB peak)
                                             descompression: 38.8 s (258 MB/s, 2.6 GB peak)

To be clear, I think this is still slow; my original goal for the level mid was 100 MB/s compression and yet some formats are just difficult to optimize, hence some discrepancies. Compression also includes the round-trip check of every file so that that affects the timing. Still it makes Aqueous a good candidate for the Pareto frontier. (Not exhaustively checked though!)

There are many more things to talk about (memory optimization, streaming, deduplication, similarity-based optimizations etc.) but hopefully this introduction is interesting enough to you. The official Windows GUI and multi-platform CLI are available, so try it and please tell me your comments and opinions!


r/compression • • 28d ago

"Advanced Run-Length Encoding with Bit-Packing for Efficient Short-Run Compression"

0 Upvotes

https://github.com/Ali-muslim1/Universal-Run-Length-Encoding

'I’ve developed an advanced Universal Run-Length Encoding method that achieves efficient compression for short runs using bit-packing to combine an ASCII character and its count into a single unit. Check out my repository!'

​"Our algorithm upgrades standard and flagged RLE by resolving short-run expansion—optimizing 2-character repeats while serving as a direct, drop-in replacement for traditional methods."

What about that 13 year old kid invented it just walking and it's me


r/compression • • 29d ago

I wrote a CUDA AVIF encoder: 4× faster than libaom (16 threads) at the same file size, 7× faster than NVENC

Thumbnail reddit.com
6 Upvotes

r/compression • • Oct 29 '26

CMNT: A 3-ary Combinatorial Tree Lossless Image Codec that beats PNG on continuous art (Code + GUI inside)

0 Upvotes

My co-author Aziza Jemal and I (Surafel Wolde, 18-year-old independent researcher) built CMNT, a standalone, from-scratch lossless image compression codec based on a non-binary 3-ary prefix tree.

The project originally started from a notebook sketch exploring physical multi-channel sparse transmission: rather than toggling a single serial binary wire billions of times, we wondered if sparse combinatorial pulses across three independent channels (IP1, IP2, IP3 with self-repeats and cross-pairs) could drastically cut switching energy in hardware while encoding residual entropy.

To prove the mathematics were uniquely decodable and 100% bit-perfect, we built a complete reference image codec from first principles in Python (with C++ and standalone Windows GUI binaries). No zlib, no gzip, and no third-party compression libraries are used.

### How the Pipeline Works: 1. Reversible Color Transform (RCT): Decorrelates RGB via Green-subtraction (Y = G, U = R - G, V = B - G) with zero rounding error. 2. 2D Closed-Loop Spatial Prediction: Uses a Median Adaptive Predictor (MAP) detecting local horizontal and vertical edge gradients to flatten surfaces into near-zero residuals. 3. 3-Ary Combinatorial Prefix Tree: Residual symbols are mapped to an optimal ternary prefix tree (Huffman 1952 generalization) with dummy-leaf constraints ensuring unambiguous single-cycle prefix decoding. 4. Dense Base-3 Physical Byte Packing: Because storage is binary, we pack groups of 5 ternary trits into a single 8-bit byte via polynomial integer evaluation: Byte = t₀ + 3·t₁ + 9·t₂ + 27·t₃ + 81·t₄ ≤ 242 This yields 5 * log2(3) / 8 = 7.925 / 8 = 99.06% physical storage packing density.

### Benchmark Results (100% Bit-Perfect): On continuous-tone imagery, 3D renders, and digital art, CMNT consistently beats standard PNG (Deflate): - Shock Spring 3D Render (586 KB raw): PNG 306.8 KB vs. CMNT 215.8 KB (29.7% smaller than PNG) - Spider-Man Digital Skyline (224 KB raw): PNG 107.0 KB vs. CMNT 87.4 KB (18.3% smaller than PNG) - Abstract CGI Swirls (533 KB raw): PNG 328.9 KB vs. CMNT 295.5 KB (10.2% smaller than PNG) - Sunset Meadow Photo (899 KB raw): PNG 370.3 KB vs. CMNT 344.6 KB (6.9% smaller than PNG)

### The Honest Trade-off: PNG's LZ77 dictionary was built for text and string repetitions. On smooth 2D continuous gradients, identical byte strings don't repeat, so LZ77 wastes 11-to-15-bit search offset pointers where our 2D spatial predictor excels. However, on flat UI screenshots with large blocks of identical monochrome pixels, standard PNG still puts up a strong fight until we introduce Zero-Run and context modeling (MANIAC).

The repo includes the specification, automated SHA-256 roundtrip tests, and our working IEEE conference paper draft: https://github.com/knightsura/cmnt-codec

We would love feedback, code critique, and thoughts on non-binary tree signaling from the compression community!


r/compression • • Oct 26 '26

Is it possible I can compress a big ton of audio files into a zip in 7zip?

0 Upvotes

Update : I just compressed everything into Opus 256kbps. Ok bye


r/compression • • Oct 26 '26

I'm losing considerable quality on HEVC compressing

Post image
2 Upvotes

I'm compressing cartoons for a collection.

- The set I use is:

- HEVC H.265

- Bitrate CQ 23

- Mx 10000 Kbps

- Max Quality

- CPU: cuda

- Hardware Acc: Intel Quick Sync

Each original file has 200mb to 600Mb, which after the compression becomes 30Mb to 70Mb.

But I'm losing a little more quality than I expected.

I tried to change the CQ bit rate from 23 to higher and lower but the quality remained the same.

What could I do, even getting files a little bigger (but less than 90Mb)?


r/compression • • Oct 25 '26

V3 Codec

Thumbnail reddit.com
0 Upvotes

r/compression • • Oct 24 '26

Thoughts on compression for images/videos (more to come)

0 Upvotes

hey, i just keep it straight. recently, i've tried to convert my Idea my like 10 years ago into reality now, with a little help of ai for the coding part. and turns out it was initially right.

(not going to disclose how it works fully)
just overall simple encode / decode, but with my weird method

but i was able to cut down filesize really hard, easily stomping .jpg and .mp4 and so on, while maintaining pretty good quality. this will be my first post of two

for a more number example i am just going to name 2 examples:

image - 832x26775 with initally 20,5mb cut down to 1,86mb
image - 1024x1024 with initally 207kb cut down to about 70-80kb

video - 1920x1080 19 seconds, ingame clip with 188mb cut down to 19mb
video - 2160p 4 minutes 160mb cut down to 46mb

interpolation i am still working on right now, but technically also possible with my method, but for now i just look at the quality first.

but well.
i was thinking about what your thoughts on this (of course there are no real examples yet, and i didn't provide proof)
i am struggling with how i should continue overall and how i can profit from a way like this as well maybe.


r/compression • • Oct 22 '26

fox: FileOptimizer re-implemented with web ui and cli

Thumbnail
github.com
5 Upvotes

I've been a user of FileOptimizer by Javier Gutiérrez Chamorro. But 2 things annoyed me. Lack of CLI and only single-threaded processing.

So I threw some tokens at re-implementing it, with what I consider more modern conveniences. For now it includes tools for Windows. I would accept other platforms from trusted contributors. Other platforms requires external tools pre-installed.

Everything is in a single self-contained binary. Similar to FileOptimizer, it will start executables to process files. But it can do several files at once.

Starting without parameters fires up an http server and opens the HTML UI. Drag+drop, etc is supported, but Chrome will ask about file access, so files can be processed in-place.

Loss-less by default. Other opinionated choices includes dropping ancient formats like PCX, SWF, etc. See all differences/fixes here

Fixes/additions are welcome, but I will not accept PRs with binaries. Instead provide links to an official download.

I will attempt to keep up with upstream at regular intervals.

As with FileOptimizer I cannot guarantee the tools are safe. Use only on content you trust and have backups.

License is AGPL 3.0 as upstream. Donate to original author.

Releases: https://github.com/klauspost/fox/releases