Skip to content

v0.0.1

Choose a tag to compare

@muhammad-fiaz muhammad-fiaz released this 04 Aug 09:38

zstd.zig v0.0.1

Initial release of Zig bindings for the zstd (Zstandard) compression library.

What's New

  • Complete Zig 0.16.0 bindings for zstd 1.6.0
  • Full coverage of the zstd C API: zstd.h, zstd_errors.h, zdict.h
  • All APIs re-exported at root level — use zstd.compress(), zstd.decompress(), etc. directly

API Modules

Module Description
simple One-shot compress/decompress
cctx Compression context with full parameter control
dctx Decompression context with full parameter control
stream Streaming compression/decompression for large data
dict Dictionary compression with CDict/DDict
zdict Dictionary builder (ZDICT) for training from samples
errors Unified Zig error set for all zstd error codes
version Library version and capability queries

Quick Start

const zstd = @import("zstd");

const compressed = try zstd.compress(allocator, data, 3);
defer allocator.free(compressed);

const decompressed = try zstd.decompress(allocator, compressed, data.len);
defer allocator.free(decompressed);