展示HN:Stb_zip – 仅包含头文件的C语言ZIP解析器,无依赖,速度快

1作者: Forgret5 天前原帖
我构建了一个小型的、仅包含头文件的 C 库,用于解析 ZIP 压缩文件,且没有外部依赖。 它可以在从嵌入式设备到桌面游戏的各种平台上运行,并支持“存储”和“压缩”两种方式。 <p>基准测试(Core i7-12700K,32GB RAM): - 解压 1GB:0.8秒(比 miniz 快 2.1 倍) - 解析 10 万个文件:12 毫秒(快 3.2 倍) - 1GB 的 CRC32:0.2 秒(快 5.5 倍) <p>GitHub: https://github.com/Ferki-git-creator/stb-zip <p>采用 MIT 许可证,欢迎反馈。
查看原文
I&#x27;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 &quot;store&quot; and &quot;deflate&quot; compression.<p>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)<p>GitHub: https:&#x2F;&#x2F;github.com&#x2F;Ferki-git-creator&#x2F;stb-zip<p>MIT licensed, feedback welcome.