Import with #import "std/zlib_linux".

ZlibCompress :: (input: []u8, output: *Vec(u8), level: s32, window_bits: s32) -> bool

Appends INPUT compressed at LEVEL (0 to 9, -1 for zlib's default) to OUTPUT. False when zlib refuses the settings or the input.

ZlibDecompress :: (input: []u8, output: *Vec(u8), limit: s64, window_bits: s32) -> bool

Appends the stream INPUT holds, decompressed, to OUTPUT. False for a damaged or truncated stream, trailing bytes, or more than LIMIT bytes.

Source ↗ · All modules