NanoSVG is a C library for parsing and rasterizing SVG files. It consists of two single-header files: nanosvg.h for parsing SVG into cubic bezier paths, and nanosvgrast.h for rasterizing those paths into RGBA pixel data. The library handles a wide range of SVG features including basic shapes (rect, circle, ellipse, line, polyline, polygon, path), fills, strokes, linear and radial gradients, and transformations. Designed for ease of use in applications and games, it requires only standard C libraries and can be integrated by simply copying the header files and defining the appropriate implementation macros. The parser (nanosvg.h) reads SVG files through a custom XML parser and converts them into a structured representation of bezier paths. It properly handles SVG coordinate systems, viewBox transformations, and unit conversions (px, pt, pc, mm, cm, in). The rasterizer (nanosvgrast.h) then takes this path data and converts it to a pixel buffer using a scanline rasterization algorithm with anti-aliasing. Together, these components provide a complete solution for rendering SVG content in applications that need vector graphics support without heavy dependencies. While the README notes the project is not actively maintained, the library continues to be widely used due to its simplicity, reliability, and permissive zlib license. Its single-header design makes it particularly suitable for embedding in projects where minimizing dependencies is important, such as game development or desktop applications.
minimp3 is a minimal, high-performance, ISO-conformant MP3 decoder implemented as a single-header C library (minimp3.h). It provides a low-level frame decoding API and a higher-level streaming/seek API (minimp3_ex.h) with callback-based I/O abstraction. The decoder supports SSE and NEON SIMD acceleration, and compiles to a ~30kB binary with zero external dependencies. The repository includes a comprehensive test suite with over 50 test vectors covering standard and edge-case MPEG audio streams, a fuzzing harness, and a full-featured GUI player (using SDL2 and Nuklear) that demonstrates real-world usage. An additional tool (huffopt) generates optimized Huffman tables for Layer III. The library is designed for embedded systems, game engines, and any environment requiring a lightweight MP3 decoder.