These libraries are experimental. APIs may change without notice. Generated from source with koruc 0.1.7 on 8/19/2026.

GZip

@korulang/gzip@0.0.1

Gzip compression for Koru - compile-time or runtime

gzip/index.kz · 7 tors

@korulang/gzip - Gzip compression for Koru · 15 more lines
@korulang/gzip - Gzip compression for Koru Wraps zlib (the industry standard) for gzip compression/decompression. Works at both compile-time and runtime. USAGE: ~import koru/gzip ~koru/gzip:compress(data: my_bytes, allocator: alloc) | compressed c |> // c.data is gzipped, c.original_size for stats | error e |> // e is the []const u8 error message directly ~koru/gzip:decompress(data: gzipped, allocator: alloc) | decompressed d |> // d is the []const u8 original content directly | error e |> ...

Phantom lifecycles

Derived from the phantom labels in the declarations below — state! issues an obligation the compiler will chase, !state discharges it, a bare state holds it without moving it. Nothing here is hand-drawn.

Deflater 3 states open!fed!done!

compress

index.kz:64

compress-bytes

index.kz:134

decompress

index.kz:187

deflate.init

<open!> index.kz:285

deflate.push

<!open|!fed><fed!> index.kz:310

deflate.finish

<!fed><done!> index.kz:333

deflate.release

<!done> index.kz:363