Tristan Peralta

Libraries 2026

miniz.c3l

zlib and Deflate for C3, packaged as a c3l library.

miniz.c3l packages miniz for C3. miniz implements zlib (RFC 1950) and Deflate (RFC 1951), and it is small enough to compile into a program rather than link against a system zlib.

What it exposes

The one-shot API is the common case: mz_compress and mz_uncompress over a buffer, with mz_compressBound to size the output. The streaming API (MzStream, mz_deflate, mz_inflate) handles data that arrives in pieces. The zip functions from miniz_zip.c are included for archives.

The bindings are a direct mapping of miniz’s C API, with C3 types and constants in place of the macros. The library compiles miniz.c, miniz_tdef.c, miniz_tinfl.c, and miniz_zip.c from source, so the c3l package carries no pre-built binaries and works on the targets C3 supports.

Where it is used

c3web lists miniz as a dependency; compression is one of the pieces an HTTP suite does not want to reimplement. Kiln also uses it in its screenshot tests to read and write PNGs.

Status

A c3l library, consumed by adding miniz to project.json and cloning the repository into lib/. The README has the one-shot, streaming, and zip examples.