24

Show HN: Easy alternative to giflib – header-only decoder in C

Hi 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.

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

2 days agoanitil

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.

2 days agoFerkiHN

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!

3 days agoFerkiHN

> compatible with C89 environments

What do you mean by this? Because the code I'm looking at does not appear to be C89.

2 days agoranger_danger

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.

2 days agoFerkiHN

> You're right to question that — thanks for catching it.

I see this phrase, complete with em-dash, dozens of times a day, every day.

Everyone does, I guess.

2 days agolelanthran

Haha fair point Guilty as charged — I guess I went full "HN polite mode" there. But yeah, seriously appreciate the feedback — makes the project stronger.

2 days agoFerkiHN

I've seen some claim that it may imply the usage of LLMs.

2 days agomajorchord

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)

3 days agoeqvinox

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.