Show HN: Easy alternative to giflib – header-only decoder in C
github.comHi HN, I made a lightweight, header-only GIF decoder in C, inspired by stb-style libraries. No dynamic allocation, portable, and optimized for embedded devices.
GitHub: https://github.com/Ferki-git-creator/TurboStitchGIF-HeaderOn...
Would love feedback or suggestions.
I made this to replace giflib for embedded and low-resource use cases. It's:
header-only (drop-in),
zero-allocation (you provide the buffer),
faster LZW decoding (turbo mode),
compatible with C89 environments, etc.
Happy to get feedback or suggestions!
Listing code size numbers for arm-none-eabi-gnu might be good advertisement (compile/"size" output of a file using all the functions is enough, no need to figure out some target to link or have a main() for)
Good point — thanks! I’ll add a compiled code size example using `arm-none-eabi-gcc` and `size` to the README.
P.S. When I said size, I meant that it is very light and if you use it in a project, the binary itself will be smaller, and I used the ARM to test it.
> compatible with C89 environments
What do you mean by this? Because the code I'm looking at does not appear to be C89.
You're right to question that — thanks for catching it. I aimed for C89-style compatibility (e.g., no `stdint.h`, minimal features), but I may have overlooked some modern extensions.
Very nice project, interesting that there's a couple header-only projects on the front page today [0].
[0] https://news.ycombinator.com/item?id=44556318
Thanks! Yeah, seems like it's header-only Thursday I love the stb-style “drop-in and go” approach — it keeps things clean and easy to adopt, especially for low-level or embedded projects.