6 ms·
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-HeaderOnly-Fast-ZeroAllocation-PlatformIndependent-Embedded-C-GIF-Decoder https://github.com/Ferki-git-creator/TurboStitchGIF-HeaderOn...
Would love feedback or suggestions.
- FerkiHN 1y agoI 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!
- eqvinox 1y agoListing 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)
- FerkiHN 1y agoGood 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.
- ranger_danger 1y ago> compatible with C89 environments What do you mean by this? Because the code I'm looking at does not appear to be C89.
- FerkiHN 1y agoYou'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.
- lelanthran 1y ago> 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.
- FerkiHN 1y agoHaha fair point Guilty as charged — I guess I went full "HN polite mode" there. But yeah, seriously appreciate the feedback — makes the project stronger.
- majorchord 1y agoI've seen some claim that it may imply the usage of LLMs.
- anitil 1y agoVery 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 https://news.ycombinator.com/item?id=44556318
- FerkiHN 1y agoThanks! 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.