Show HN: Stb_zip – header-only C ZIP parser, zero dependencies, fast
4 Forgret 5 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.
I filed an issue with the details: https://github.com/Ferki-git-creator/stb-zip/issues/1
Edit to add: I see now that you also did the Uprintf submission from a few days ago (https://news.ycombinator.com/item?id=44960664) which had some baffling bugs, and then you mentioned that you were using AI for some of it. That might explain the missing parts here too.
C headers can include arbitrary code, right? So why is "header-only" better than having file.h & file.c?
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.
Why not say what you really mean? Which seems to be: "single-file" library.