Show HN: Stb_zip – header-only C ZIP parser, zero dependencies, fast

3 Forgret 3 8/24/2025, 8:31:37 AM
I've built a small, header-only C library to parse ZIP archives with no external dependencies. It works on everything from embedded devices to desktop games and supports both "store" and "deflate" compression. Benchmarks (Core i7-12700K, 32GB RAM): - Decompress 1GB: 0.8s (2.1x faster than miniz) - Parse 100k files: 12ms (3.2x faster) - CRC32 of 1GB: 0.2s (5.5x faster)

GitHub: https://github.com/Ferki-git-creator/stb-zip

MIT licensed, feedback welcome.

Comments (3)

ycombinatrix · 1h ago
What is the significance of a library being "header-only"?

C headers can include arbitrary code, right? So why is "header-only" better than having file.h & file.c?

gkbrk · 1h ago
Why would I want to deal with downloading and handling multiple files when I can just use a single file?

Turning a header-only library into file.h and file.c is easy if I want to do it. Turning a multi-file project into a single header file is a lot more work.

ycombinatrix · 1h ago
A "header-only" library can presumably be multiple header files, which is not what you are discussing.

Why not say what you really mean? Which seems to be: "single-file" library.