Bindings for [[ libz ; https://zlib.net ]] ZLIB compression library.

Collection Info

View Source
Collection
vendor
Path
zlib
Entries
146

Source Files

Constants

37

ASCII #

Source
ASCII :: TEXT

for compatibility with 1.2.2 and earlier

BINARY #

Source
BINARY :: 0

Possible values of the data_type field for deflate()

DEFLATED #

Source
DEFLATED :: 8

The deflate compression method (the only one supported in this version)

FILTERED #

Source
FILTERED :: 1

compression strategy; see deflateInit2() below for details

NO_FLUSH #

Source
NO_FLUSH :: 0

Allowed flush values; see deflate() and inflate() below for details

OK #

Source
OK :: 0

Return codes for the compression/decompression functions. Negative values are errors, positive values are used for special but normal events.

Types

25

Procedures

84

gzgetc #

Source
gzgetc :: proc(file: ^gzFile_s) -> i32 {…}

zlib.h redefines gzgetc with a macro and uses (gzgetc)(g) to invoke it from inside the same macro (preventing macro expansion), in Odin we give that a unique name using link_prefix then implement the body of the macro in our own procedure calling the unique named gzgetc instead.

version #

Source
@(link_prefix="zlib")
version :: proc "c" () -> cstring ---

becase zlib.zlibVersion would be silly to write

Version #

Source
@(link_prefix="zlib")
Version :: proc "c" () -> cstring ---

becase zlib.zlibVersion would be silly to write