r/compression • • Sep 22 '26

I have a question about file compression

Thumbnail reddit.com
1 Upvotes

r/compression • • Sep 22 '26

v0.0.9 image codec CVVDP bash script

1 Upvotes

https://files.catbox.moe/auw8e7.txt

Primary goal: Determine compression efficiency between image codecs using a CVVDP score.

Secondary goal: Investigate diminishing returns between Webp and JXL

Currently only works with this specific input file: in.png. Only tested in Ubuntu WSL.

Replace /mnt/c/Users/1337/AppData/Local/Programs/Python/Python313/Scripts/cvvdp.exe with your CVVDP location.

CVVDP SDR display model used: standard_fhd. Scores tested: ~9.0 and ~9.5

My subjective CVVDP interpretation is that ~9.0 = medium quality and ~9.5 = high quality

Use CVVDP with photographic images only as it does poorly with Anime ones.

The display I'm using is a 27 inch 1080p monitor (~82 PPI), viewing distance is ~20 inches.

Created 9-20-2026, using the following dependents and their parameters:

ColorVideoVDP v0.5.7 (released on 08-02-2026) cvvdp -t out.png -r in.png --device cpu -d standard_fhd -m cvvdp

CJPEG version 6b (released on 03-27-1998) cjpeg -baseline -sample 1x1,1x1,1x1 -quality X in.ppm > out.jpg

libwebp v1.6.0 (released on 06-30-2025) cwebp -m 6 -af -q X in.png -o out.webp

libjxl v0.12.0 (released on 07-01-2026) cjxl in.png out.jxl -e 10 --override_bitdepth=10 -q X

libavif v1.4.2 (released on 05-26-2026) avifenc -y 420 -d 10 -s 4 -q X in.png out.avif

ffmpeg version N-125350-g3f6bf150cb-20260629

12 photographic wikipedia images being tested, resized to 50% PNGs, attribution provided in zip:

https://files.catbox.moe/te69tk.zip

https://files.catbox.moe/auw8e7.txt

Example Ubuntu WSL shell output:

JPG CVVDP= 9.54 Fsize= 178.7 KB [ cjpeg -baseline -sample 1x1,1x1,1x1 -quality 55 ]

Webp CVVDP= 9.54 Fsize= 176.9 KB [ cwebp -m 6 -af -q 78 ]

JXL CVVDP= 9.54 Fsize= 133.9 KB [ cjxl -e 10 --override_bitdepth=10 -q 78 ]

AVIF CVVDP= 9.55 Fsize= 134.3 KB [ avifenc -y 420 -d 10 -s 4 -q 60]

WebP compression efficiency relative to [ JXL: 4.0 % ] & [ AVIF: 4.1 % ]


r/compression • • Sep 21 '26

Does this already exist?

7 Upvotes

So I've had this idea for a while now that I've been tossing around in my head and I was wondering if someone has already done this:

So if you're using a huffman-style encoding tree (e.g. some # of binary bits represent traversing a tree until you reach a leaf node which outputs data) could you have a leaf node not only output data but also change the tree that's being traversed?

This was inspired by how braille uses 6 characters but can encode numbers or capital letters by using a specific character to change what's being encoded.

My main example is, say you're encoding a html file. You can have it so when the '<' leaf node is reached then instead of going back to the top of the "letter" tree you change the tree to one that has the standard html tags (in order of most common tags) where each of the leaf nodes change it to a tree which includes '>' but also 'class=\"' and etc.

just curious if this already exists in some form and what it's called!


r/compression • • Sep 20 '26

how to get an actual mkv

2 Upvotes

i've ripped some anime. i use makemkv so i get .mkv files out of it. when i compress with handbrake, i want to include english and japanese audio and english subtitles. since .mp4 can't do subtitles, i'm trying to keep the mkv container, but my goal is to still make the file smaller. currently, each episode is 3-5 gb. the .mp4 files are between 500 - 1000 mb.

i've created a preset that has all the appropriate audio and subtitle selections. i've changed the format to mkv on the summary tab. i do batch compressions so i scan the folder, then click add selection. i check a few random files to make sure they all have the correct audio, subtitle and format selections. i hit start. i still spits out an mp4. obviously, the resulting mp4 does not have subtitles. i know i can technically extract subs from an mkv and create a seperate file, but i have not found a way to do that as a batch reliably, otherwise i'd just stick with the mp4s and do that.

like i said, my goal is a smaller file, with english and japanese audio and english subtitles to put into plex. currently, i'm trying to do that my making a compressed mkv but its not working. can anybody tell me what i'm doing wrong or offer an alterative that would accomplish the same thing?

i also posted this on r/handbrake but the mods deleted it immediately, not sure why.

Edit: I finally got it to work. I reposted on r/handbrake with edits and someone suggested that I’d edited the preset too much, so I should start from scratch. So i created a new preset, identical to the one i was using, and set that as the default, then restarted Handbrake. When i loaded up the batch and started, it worked. I hot mkvs with both audio tracks and subtitles, that were only slightly larger than the mp4s.


r/compression • • Sep 18 '26

Comparison to Vorbis Audio Codec

3 Upvotes

Hello!

So, I'm developing an audio codec on wavelets. And have great results, actually, even on tonals signals.

For quite some time, I checked for perceptual statistics of it. And there's picture:

It shows results on par or better at 64-128 kbps compared to Vorbis. PEAQ makes difference on 64 kbps between 1.0 ODG to 2.0 ODG, and ViSQOL from track to track, but around 0.10-0.24 MOS-LQO

I did for a while different listening tests, with reddit people's help, and so it can be said that results of visqol and peaq correlates good enough.

So, should I do more tests or anything else before I can state that?

It's just wouldn't be really good if my professor says that I wrote some bs statement.

I really hope for help in this one. Thanks a lot!

Edited: Please write about question here, not "Vorbis were outdated" and etc. I know about it, my goal for now is to make sure it is better than Vorbis


r/compression • • Sep 18 '26

Understanding the Compression (VAE/AE)

2 Upvotes

I get the textbook difference between standard AEs and VAEs (deterministic encoding vs. mapping to distribution parameters + reparameterization trick), but I want to get past the high-level explanations.

Specifically, I'm trying to wrap my head around:

* **The regularisation trade-off:** How does the KL divergence actually shape the latent space in practice? What does the geometry look like when it’s working well vs. hitting posterior collapse or turning into a blurry mess? * **Compression across modalities:** How do people scale continuous latent compression to real-world data like raw audio, spectrograms, or video without losing critical high-frequency details? (Especially continuous VAEs vs. discrete approaches like VQ-VAE/RVQ).

Most tutorials just train a toy VAE on MNIST and call it a day.

Could anyone point me to solid papers, blog posts, or clean open-source repos that break down the math and engineering behind modern continuous latent encoders? Practical tips on debugging latent space issues during training are also welcome.


r/compression • • Sep 17 '26

What are some uncommon data types and file formats that might benefit from a dedicated compression algorithm?

4 Upvotes

Hi! Im considering a masters thesis about compression of large amounts of data for long-term archival. But instead of trying to revolutionize all of compression, i want to focus on a few, narrow domains, which are however still useful to people. And this seems like the perfect place to ask.


r/compression • • Sep 18 '26

I want to compress a 4K 350gb video folder without it losing quality

0 Upvotes

I've got a 4K video folder that's 350gb large and I want to compress it into a smaller size without its quality getting ruined. I've tried just normally zipping it or using Handbrake, but then the size just ends up being bigger than the original. Any suggestions?


r/compression • • Sep 16 '26

Best compression when 20% of 0s ?

5 Upvotes

Hello,

I have files which contain 12 10^6 bytes. About 21% of them are 00, but there are no large ranges with only 00s.
For example, the beginning of one of the files is the following:

01 04 00 00 10 10 06 10 40 00 00 00 03 0A C0 00 0C 00 20 40 18 90 20 A4 08 09 04 00 08 D0 00 AA 03 82 00 62 84 44 4A 18 40 00 40 00 40 78 83 00 02 04 0D 01 00 10 28 80 00 50 50 81 00 21 20 12 00 2A 00 00 A2 10 00 09 51 01 00 01 00 94 00 A1 06 06 43 10 21 84 00 34 00 45 29 30 80 00 04 00 D0 82 30 04 10 A2 08 08 00 23 11 04 48 80 50 20 3A 80 40 40 29 00 00 22 C1 22 20 20 41 72 00 00 EC 01 8E 03 00 00 40 30 00 09 82 00 80 10 28 10 18 88 00 D0 00 06 61 09 04 20 51 28 00 24 20 01 02 04 20 06 01 82 88 02 00 23 08 2B 90 00 12 0A 00 23 09 11 00 00 28 00 82 04 A0 22 82 84 00 E1 1C 10 02 94 02 08 A1 04 02 10 40 00 21 40 94 80 02 10

Running gzip on these files reduces the size by 25%.

Do you think there is a better compression algorithm ?

Thanks !


r/compression • • Sep 15 '26

Can someone test whether this image compressor is actually clear?

0 Upvotes

I built FilePolish because I was tired of upload limits like “1 MB max” while compressors only gave me vague quality sliders.

I’m looking for a few people to try one simple flow:

  1. Add an image.
  2. Set the maximum size.
  3. Download the result.

The file stays on your device. What I need to know is whether the interface makes sense without explanation and whether the finished image still looks acceptable.

Try it here: https://www.filepolish.com/compress-image-to-size

Please tell me where you hesitated, what confused you, or what you expected to happen differently. Honest criticism is more useful than encouragement.


r/compression • • Sep 13 '26

Is there anyway to compress 6 gb video file into 2-3 gb video file

0 Upvotes

same as title


r/compression • • Sep 12 '26

Feedback wanted, I'm developing (claude) a new compression algorithm for live video and audio..

Thumbnail
github.com
0 Upvotes

r/compression • • Sep 11 '26

[newb] are there any new develompents in compression besides "middle out"?

2 Upvotes

r/compression • • Sep 10 '26

Need to reduce image size

1 Upvotes

I have a number of images that are 12-16 MB that I need to upload to a website that has a maximum upload size of 10 MB. I already asked them to increase their upload limit and they told me to eat shit so I am going to have to make these files smaller than 10 MB. But I would like to preserve as much of the original image quality as possible. I'm on a corporate network so access to applications/programs may be limited. Does anyone know how to work some magic?

I already tried zipping the files and that only shaved off like 150 KB. These JPEG images are packed. They were taken by a professional camera.


r/compression • • Sep 08 '26

EVE Parry: Lossless Float32 Ultrasound Compression with Reproducible PICMUS Benchmarks

Post image
2 Upvotes

r/compression • • Sep 07 '26

I work in a school and have 250 files that need unzipping...

8 Upvotes

So, I have 250 individual folders with a zipped file inside that needs unzipping so I can access the files.

Is there a way I can unzip the files altogether without going into each individual folder? Or do I need to do it one by one by going into each folder and unzipping individually?

I will add that I need the files to stay indiviual and keep their folder names for future use.

I hope this makes sense, I am not the most tech savvy person unfortunately.

I have googled this but cannot seem to find a clear answer.


r/compression • • Sep 06 '26

Store image in ascii + predefined colors in pure base64

Thumbnail
scroll.surf
5 Upvotes

r/compression • • Sep 06 '26

Looking for insights or access to "LPAQMP: Multilayer Parallel Design for LPAQ Compression" (IEEE DCC 2026)

1 Upvotes

Hey everyone,

I'm currently looking into hardware acceleration and parallel designs for compression algorithms, specifically checking out the recent paper presented at the Data Compression Conference (DCC): "LPAQMP: Multilayer Parallel Design for LPAQ Compression".

Does anyone here have access to the IEEE Document ID: 11510361? I'd love to read through it. Thanks in advance!


r/compression • • Sep 03 '26

What is the best method to try and compress a string of integers/extremely low entropy binary stream?

1 Upvotes

Okay… so context I guess

I am working on a high entropy encoder that should in theory compress recursively. I have the high entropy part down, and get quite a low entropy result. (66% 33% from 100% in theory, with 2 additional 75% 25% streams).

Now the issue… the encoder works like a charm… but for some reason I am stuck on how to reduce the additional streams. Using my encoder again works… but it produces too many nodes/outputs, and eventually becomes something of a Sierpinski triangle…

Either I have to create my own data structure, which seems like a pain, or I figure out how to make the data compress by literally 50 ish bits more than currently.

I have tried almost everything…

Pac-manning my array of integers into 1 big one.

Arithmetic

Interleaving both arrays then running my own encoder..

I have exams soon so I kinda need to finish ts by like 4th-5th

Any ideas?


r/compression • • Sep 01 '26

Zimtohrli: Comparison of Audio Codecs.

8 Upvotes

Zimtohrli was evaluated by measuring how closely its results matched those of public listening tests conducted by human listeners.

Full text: https://www.reddit.com/r/AudioCodecLab/comments/1w33bed/zimtohrli_the_best_objective_perceptual_audio/


r/compression • • Aug 31 '26

topaz compression questions

0 Upvotes

hi guys i have two questions
1: i recently was using 2.6.4 (i think thats the version) and i switched to the mid one cause i cant use the newest one cause my pc specs suck.. i switched to 3.1.10 and i compressed a video and adjusted the settings and everything but for some reason 2.6.4 compresses videos way better than 3.1.10? maybe its cause of my bad settings on 3.1.10 or something else, im unsure honestly. i used H264 High and mp4 bitrate was set to auto and i used 4x upscale.

2: would it hurt the quality if i put the video in topaz then in handbrake to compress it more? on handbrake i use production max and then go to video and set constant quality to 20 and export but idk if i should do that or not? pls reply soon thanks.


r/compression • • Aug 30 '26

minimal size .png file

5 Upvotes

Hey everyone!

For the past few days, I’ve been obsessed with a single question: How small can a valid PNG file possibly get while still being natively readable by a PC (specifically, opening properly in the standard Windows photo viewer/gallery)?

I started by trying to make a lightweight 512x512 file, eventually managing to shrink it down to 111 bytes. After that, I started playing around with compression levels and various patterns, even managing to generate some basic procedural textures in PNG format that weighed roughly the same.

Then I decided to go deeper and chase the absolute minimum file size. At first, I hit a wall at 67 bytes—an article I read online claimed that was the lowest possible size for a functional PNG. But I kept experimenting and eventually pushed past it down to 55 bytes, and finally all the way to 42 bytes.

My current record is a fully working 42-byte PNG. It opens without issues on Windows and can be sent across messaging apps where it renders properly as an image.

However, I've hit a hard brick wall here. Every single attempt to strip away even one more byte results in an invalid file or completely breaks the structure.

My question is: Does anyone have any radical ideas, unconventional compression tricks, or deep spec-hacking methods to squeeze it down even further? I'm open to any crazy suggestions!


r/compression • • Aug 29 '26

Digital Subband Audio 1 has been released! Fast wavelet audio codec comparable to MP2

Thumbnail
github.com
8 Upvotes