Skip to content
REFERENCE / ZLIB × LEAN

API contracts

The complete public-interface index

95 default-build entries, plus Windows gzopen_w. Every entry retains its signature, domain, preconditions, results, memory effects, and error paths. Documentary contracts and registered goals may have different scopes; both are preserved.

adler32Update an Adler-32 checksum using a 32-bit byte count.Checksumsadler32_combineCompute the Adler-32 of A followed by B without reading either sequence.Checksumsadler32_combine64Compute the Adler-32 of A followed by B with an explicit 64-bit length.Checksumsadler32_zUpdate an Adler-32 checksum with a byte range, or obtain its initial value.ChecksumscompressThe uLong compressor at the default level.Buffers and library informationcompress2The uLong form of compress2_z.Buffers and library informationcompress2_zCompresses the input into one complete zlib stream at the requested level.Buffers and library informationcompressBoundThe uLong form of the numeric bound.Buffers and library informationcompressBound_zCalculates the numeric bound used to size a default zlib compression buffer.Buffers and library informationcompress_zCompresses at the default level (-1, selecting level 6).Buffers and library informationcrc32Update a CRC-32 checksum using a 32-bit byte count.Checksumscrc32_combineCompute the CRC-32 of A followed by B using the ordinary offset type.Checksumscrc32_combine64Compute the CRC-32 of A followed by B without reading either sequence.Checksumscrc32_combine_genGenerate a CRC combination operator using the ordinary offset type.Checksumscrc32_combine_gen64Generate an operator for repeated CRC combinations with the same B length.Checksumscrc32_combine_opCompute the CRC-32 of A followed by B using a previously generated operator.Checksumscrc32_zUpdate a CRC-32 checksum with a byte range, or obtain its initial value.ChecksumsdeflateAccept input and deliver part or all of a valid compressed stream.Compression streamsdeflateBoundReturn the uLong form of the compression bound.Compression streamsdeflateBound_zCompute a size bound using the stream's current configuration and wrapper.Compression streamsdeflateCopyCreate an independent compressor with the same compression progress.Compression streamsdeflateEndRelease the compressor, discarding any unfinished work.Compression streamsdeflateGetDictionaryRead the current compression history, including accepted lookahead.Compression streamsdeflateInit2_Start a compressor with a chosen wrapper and compression settings.Compression streamsdeflateInit_Start a compressor with the default zlib wrapper and compression settings.Compression streamsdeflateParamsChange level and strategy, finishing the old block when needed.Compression streamsdeflatePendingReport output waiting inside the compressor.Compression streamsdeflatePrimePrefix raw compression output with a caller-supplied bit fragment.Compression streamsdeflateResetReuse a stream for new compression with empty history.Compression streamsdeflateResetKeepRestart output and progress counters while retaining compression history.Compression streamsdeflateSetDictionaryLoad preset bytes as compression history without emitting them as input data.Compression streamsdeflateSetHeaderSelect the header for the next gzip stream.Compression streamsdeflateTuneSet the four expert match-search tuning values.Compression streamsdeflateUsedReport the last byte's bit use at the most recent byte-boundary flush.Compression streamsget_crc_tableReturn the library's byte-at-a-time CRC table.ChecksumsgzbufferChoose the requested buffer size before buffers exist.Gzip filesgzclearerrClear recorded error information and rearm reader EOF detection.Gzip filesgzcloseClose a reader or finish and close a writer.Gzip filesgzclose_rRelease a reader and close its descriptor without further decompression.Gzip filesgzclose_wFinish buffered output, release a writer and close its descriptor.Gzip filesgzdirectReport whether the handle is using transparent data.Gzip filesgzdopenWrap an existing descriptor without opening or duplicating it.Gzip filesgzeofQuery whether a reader has tried to read beyond available data.Gzip filesgzerrorRead the handle's current error code and message.Gzip filesgzflushProcess buffered output using the requested flush mode.Gzip filesgzfreadRead up to nitems items of size uncompressed bytes.Gzip filesgzfwriteAccept up to nitems items of size uncompressed bytes.Gzip filesgzgetcRead one uncompressed byte as an unsigned value.Gzip filesgzgetc_Provide the exported wrapper for single-byte reading.Gzip filesgzgetsRead a line fragment and terminate it with NUL.Gzip filesgzoffsetQuery physical file offset using z_off_t.Gzip filesgzoffset64Query the underlying physical file offset.Gzip filesgzopenOpen a path for reading, writing or appending.Gzip filesgzopen64Open using the large-file entry point.Gzip filesgzopen_wOpen a Windows wide-character path.Gzip files · WindowsgzprintfFormat arguments and accept the resulting bytes for output.Gzip filesgzputcAccept the low eight bits of c for output.Gzip filesgzputsAccept a NUL-terminated string, excluding its terminator.Gzip filesgzreadRead up to len uncompressed bytes.Gzip filesgzrewindReset a reader to its saved descriptor start.Gzip filesgzseekRequest an uncompressed position through the ordinary offset type.Gzip filesgzseek64Request an uncompressed position relative to start or current position.Gzip filesgzsetparamsRequest a new compression level and strategy for subsequent input.Gzip filesgztellQuery logical uncompressed position using z_off_t.Gzip filesgztell64Query the current logical uncompressed position.Gzip filesgzungetcPush one byte onto a reader's uncompressed input.Gzip filesgzvprintfFormat a va_list and accept the result for output.Gzip filesgzwriteAccept len uncompressed bytes for output.Gzip filesinflateConsume compressed bytes and write decoded bytes, preserving state across calls.Decompression streamsinflateBackPurpose. Decode one complete raw stream through the input and output callbacks.Callback decodinginflateBackEndPurpose. Release the state allocated by callback init.Callback decodinginflateBackInit_Purpose. Allocate decoder state and attach the caller's window. The inflateBackInit macro supplies version and stream_size.Callback decodinginflateCodesUsedReport the decoding-table entries used so far. This is an undocumented entry point.Decompression streamsinflateCopyCreate a decoder that can resume from the source position.Decompression streamsinflateEndRelease decoder storage, including when decoding was abandoned or failed.Decompression streamsinflateGetDictionaryRead the retained sliding history, oldest byte first.Decompression streamsinflateGetHeaderRegister caller storage for the next gzip header.Decompression streamsinflateInit2_Create a decoder with a selected wrapper and window.Decompression streamsinflateInit_Create a zlib decoder with a 32 KiB maximum window.Decompression streamsinflateMarkReport the current code position for indexing.Decompression streamsinflatePrimeSupply bits before the next input byte, or clear buffered bits.Decompression streamsinflateResetStart a new independent compressed stream using the existing configuration.Decompression streamsinflateReset2Reset and select a new wrapper and maximum window size.Decompression streamsinflateResetKeepRestart decoding while retaining history. This is an undocumented entry point.Decompression streamsinflateSetDictionaryInstall or amend the bytes available for backward matches.Decompression streamsinflateSyncSearch for a possible full-flush boundary after damaged input.Decompression streamsinflateSyncPointTest whether stored-block length bytes are the next thing expected.Decompression streamsinflateUndermineRequest the optional permissive-distance mode. This is an undocumented entry point.Decompression streamsinflateValidateEnable or disable wrapper checksum and gzip length validation.Decompression streamsuncompressThe uLong decoder without a consumed-input count.Buffers and library informationuncompress2The uLong decoder with an input-consumption count.Buffers and library informationuncompress2_zDecodes the first zlib stream and reports both output size and input consumption.Buffers and library informationuncompress_zDecodes without exposing the consumed-input count.Buffers and library informationzErrorReturns the text associated with a zlib result code.Buffers and library informationzlibCompileFlagsReports the build's type sizes and compile-time options.Buffers and library informationzlibVersionReturns the linked library's release string.Buffers and library information
ZLIB × LEAN

Global contents

READING NOWAPI contracts