GitHub - Geolm/bc_crunch at huffman
tiny dependency-free lossless compressor for BC/DXT texture streams (C99, ~1000 LoC) - GitHub - Geolm/bc_crunch at huffman
As people asked for better decompression speed in my bc_crunch lib, I started experimenting with Huffman coding. First results look promising: compression ratio is still better than zlib (~1.52:1) and decompression reaches ~144 MB/s.
github.com/Geolm/bc_cru...
(BC1 only for now)
23.01.2026 16:53
π 4
π 0
π¬ 0
π 0
nope, as you said it's complicated to get it done properly, I don't have the need ATM (not fan of the property grid everything) and it would add a lot of LOC to me lean lib.
13.01.2026 13:14
π 0
π 0
π¬ 0
π 0
I didn't had the luxury to work on my personal projects during the holidays season but here's a video of my attempt to animate my creature using position based dynamics (distance/angle/elbow constraint + ik).
07.01.2026 12:38
π 1
π 0
π¬ 0
π 0
also with multiple quads and alpha blending you have more overdraw and r/w access to the framebuffer compared to tile rendering. Another point is primitive smoothin and boolean operation that are only possible with tile
14.12.2025 12:38
π 1
π 0
π¬ 0
π 0
got a 404 error when trying to access the pdf...
12.12.2025 19:22
π 0
π 0
π¬ 1
π 0
People kept asking me to compare bc_crunch with zlib, so I finally ran the tests. Overall, bc_crunch comes out ahead. More details are available on the GitHub page.
bc_crunch BC1: 1.580368 vs zlib: 1.436144
bc_crunch BC4: 1.327702 vs zlib: 1.104125
I used miniz with the highest compression setting
12.12.2025 08:29
π 1
π 0
π¬ 0
π 0
another note : BC5 ratio is pretty bad at the moment because it treats the image as two independent channels. One solution would be to create a new function only for normalmaps that exploit inter-channel prediction (not planned for now).
10.12.2025 10:28
π 0
π 0
π¬ 0
π 0
btw I also found some small improvements for BC4, ratio went from 1.23 to 1.29
10.12.2025 10:20
π 0
π 0
π¬ 1
π 0
I understand, I might need that at some point too, if so I'll update the lib.
10.12.2025 09:07
π 1
π 0
π¬ 0
π 0
I don't know, I did not try nanovg. Onedraw supports less features for sure. I wrote this lib for my own needs and to try some ideas I had in mind, not to compete with others libs.
10.12.2025 09:06
π 1
π 0
π¬ 1
π 0
GitHub - Geolm/bc_crunch: tiny dependency-free lossless compressor for BC/DXT texture streams (C99, ~800 LoC)
tiny dependency-free lossless compressor for BC/DXT texture streams (C99, ~800 LoC) - Geolm/bc_crunch
Hey, I thought I was done with bc_crunch, but I tried one last idea: Inter-channel differential coding.
It works pretty well. The average compression ratio for BC1 went from 1.494:1 to 1.580:1, finally breaking the 1.5Γ barrier.
It's already available here: github.com/Geolm/bc_cru...
10.12.2025 07:28
π 4
π 0
π¬ 1
π 0
Do you mean using a texture map as a probability field for spawning? I'm curious, what would be the use case?
08.12.2025 15:48
π 0
π 0
π¬ 1
π 0
Haven't done a camera analysis in a while!
Here's a quick look at the camera for Metroid Dread π₯
04.12.2025 01:53
π 437
π 102
π¬ 5
π 1
Experimenting with a new control: a knob :) It should land in the public leanUI library soon. And yes, Iβm working on a synthβ¦ stay tuned (pun intended).
03.12.2025 19:41
π 0
π 0
π¬ 1
π 0
As a Canadian, I can tell you the shovel sound is a bit off. You only get that bright metal-on-concrete noise when the ground is bare. Most of the time thereβs a layer of packed snow or ice stuck to the concrete, which makes the shovel sound more muted and less metallic.
03.12.2025 09:55
π 2
π 0
π¬ 2
π 0
no the post can't be that long !! ;)
30.11.2025 21:58
π 2
π 0
π¬ 0
π 0
Uniform CatmullβRom spline sampling with disc collision and exclusion zones. Poisson-like, but curve-specific.
26.11.2025 15:35
π 2
π 0
π¬ 0
π 0
Working on a uniform sampler with dynamic exclusion zones for procedural gen. Solid results so far, code release is possible once itβs cleaner.
26.11.2025 13:35
π 1
π 0
π¬ 0
π 0
currently no, TBH it's not planned since my goal was to have a quick way to export video from my games/renderer. Feel free to fork the repo and add the features you need.
21.11.2025 14:09
π 1
π 0
π¬ 0
π 0
GitHub - Geolm/mjpegw: Tiny C99 library for creating MJPEG AVI files. No external dependencies
Tiny C99 library for creating MJPEG AVI files. No external dependencies - Geolm/mjpegw
Just released a single-file C99 library to create MJPEG AVI videos from an RGBA framebuffer.
github.com/Geolm/mjpegw
Like jo_mpeg, but MJPEG gives higher quality (larger files).
β’ 3-function API
β’ No dependencies
β’ No audio
β’ Plays in ffmpeg & VLC
Huge thanks to Tiny-JPEG for the JPEG part.
21.11.2025 10:38
π 3
π 0
π¬ 1
π 0
Also, thereβs a benchmark in the repo at /test/benchmark.c that profiles BC1 crunch/decrunchβmake sure to compile with optimization flags.
19.11.2025 10:27
π 0
π 0
π¬ 0
π 0
Some optimizations news: NEON + decoder table in bc_crunch β decrunch ~1.5Γ faster, crunch ~1.3Γ faster. No plans for more performance tweaks right now, but I left some ideas in the README. Ping me if you want to chat about them!
19.11.2025 10:23
π 0
π 0
π¬ 1
π 0
Hi everyone! Thanks for the interest in my library bc_crunch. Quick update: Iβm currently working on optimizations. Two major bottlenecks have been identified, and fixes are on the way. Iβll share some performance numbers soon and add a profiling test to the repo.
18.11.2025 09:30
π 2
π 0
π¬ 0
π 0
Iβve updated the BC4 algorithm and Iβm curious whether it improves the compression ratio on your textures as well. For reference, my AO/displacement map went from 1.051032 to 1.211644 (a 15.3% gain). I have still some ideas left, I will try to continue to improve more.
17.11.2025 12:13
π 0
π 0
π¬ 0
π 0
Update, I changed the heuristic for BC4 streams, went from an average ratio of 1.051032 to 1.211644. Tested on AO, displacement map (check textures/bc4 folder)
17.11.2025 12:09
π 0
π 0
π¬ 0
π 0
Thanks! I haven't had time to profile decompression yet, so that measurement is really helpful. Would you mind if I add that number to the project page?
17.11.2025 09:51
π 0
π 0
π¬ 1
π 0
Thanks for the feedback! I agree on BC4/5 β right now itβs a bit hit-or-miss and too dependent on input noise. The algorithm still needs improvement there. Iβm currently building a BC5 test texture set, which should help compare different approaches more reliably.
17.11.2025 09:48
π 0
π 0
π¬ 0
π 0
Don't hesitate to message me if you find a bug or if you have a question or feedback. I will update the readme with the BC4 benchmark soon.
15.11.2025 16:47
π 1
π 0
π¬ 0
π 0
GitHub - Geolm/bc_crunch: tiny dependency-free lossless compressor for BC/DXT texture streams (C99, ~700 LoC)
tiny dependency-free lossless compressor for BC/DXT texture streams (C99, ~700 LoC) - Geolm/bc_crunch
Just released bc_crunch: a tiny (~700 LOC), C99 library for lossless BC1/BC4/BC3/BC5 compression.
One .c/.h pair, no deps, no malloc
GPU-ready output
Zigzag + delta + popcount/dictionary tricks
Tested
Perfect for games, procedural assets, streaming textures.
github.com/Geolm/bc_cru...
15.11.2025 13:18
π 40
π 8
π¬ 3
π 0