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. The documented contract and the Lean goal may differ in scope; each is shown as it is.
adler3232-bit checksumUpdate an Adler-32 checksum using a 32-bit byte count.Checksums↗adler32_combineChecksum or length-rejection valueCompute the Adler-32 of A followed by B without reading either sequence.Checksums↗adler32_combine64Checksum or length-rejection valueCompute the Adler-32 of A followed by B with an explicit 64-bit length.Checksums↗adler32_z32-bit checksumUpdate an Adler-32 checksum with a byte range, or obtain its initial value.Checksums↗compresszlib status code; output length is written separatelyThe uLong compressor at the default level.Buffers and library information↗compress2zlib status code; output length is written separatelyThe uLong form of compress2_z.Buffers and library information↗compress2_zzlib status code; output length is written separatelyCompresses the input into one complete zlib stream at the requested level.Buffers and library information↗compressBoundSaturated compression-capacity valueThe uLong form of the numeric bound.Buffers and library information↗compressBound_zSaturated compression-capacity valueCalculates the numeric bound used to size a default zlib compression buffer.Buffers and library information↗compress_zzlib status code; output length is written separatelyCompresses at the default level (-1, selecting level 6).Buffers and library information↗crc3232-bit checksumUpdate a CRC-32 checksum using a 32-bit byte count.Checksums↗crc32_combineChecksum or length-rejection valueCompute the CRC-32 of A followed by B using the ordinary offset type.Checksums↗crc32_combine64Checksum or length-rejection valueCompute the CRC-32 of A followed by B without reading either sequence.Checksums↗crc32_combine_genCRC combination operatorGenerate a CRC combination operator using the ordinary offset type.Checksums↗crc32_combine_gen64CRC combination operatorGenerate an operator for repeated CRC combinations with the same B length.Checksums↗crc32_combine_opCRC-32 checksum or operator-rejection valueCompute the CRC-32 of A followed by B using a previously generated operator.Checksums↗crc32_z32-bit checksumUpdate a CRC-32 checksum with a byte range, or obtain its initial value.Checksums↗deflatezlib status codeAccept input and deliver part or all of a valid compressed stream.Compression streams↗deflateBoundOutput-capacity bound (bytes)Return the uLong form of the compression bound.Compression streams↗deflateBound_zOutput-capacity bound (bytes)Compute a size bound using the stream's current configuration and wrapper.Compression streams↗deflateCopyzlib status codeCreate an independent compressor with the same compression progress.Compression streams↗deflateEndzlib status codeRelease the compressor, discarding any unfinished work.Compression streams↗deflateGetDictionaryzlib status codeRead the current compression history, including accepted lookahead.Compression streams↗deflateInit2_zlib status codeStart a compressor with a chosen wrapper and compression settings.Compression streams↗deflateInit_zlib status codeStart a compressor with the default zlib wrapper and compression settings.Compression streams↗deflateParamszlib status codeChange level and strategy, finishing the old block when needed.Compression streams↗deflatePendingzlib status codeReport output waiting inside the compressor.Compression streams↗deflatePrimezlib status codePrefix raw compression output with a caller-supplied bit fragment.Compression streams↗deflateResetzlib status codeReuse a stream for new compression with empty history.Compression streams↗deflateResetKeepzlib status codeRestart output and progress counters while retaining compression history.Compression streams↗deflateSetDictionaryzlib status codeLoad preset bytes as compression history without emitting them as input data.Compression streams↗deflateSetHeaderzlib status codeSelect the header for the next gzip stream.Compression streams↗deflateTunezlib status codeSet the four expert match-search tuning values.Compression streams↗deflateUsedzlib status codeReport the last byte's bit use at the most recent byte-boundary flush.Compression streams↗get_crc_tableBorrowed read-only table pointerReturn the library's byte-at-a-time CRC table.Checksums↗gzbufferZero / minus-one control resultChoose the requested buffer size before buffers exist.Gzip files↗gzclearerrState reset with no return valueClear recorded error information and rearm reader EOF detection.Gzip files↗gzclosezlib close status codeClose a reader or finish and close a writer.Gzip files↗gzclose_rzlib close status codeRelease a reader and close its descriptor without further decompression.Gzip files↗gzclose_wzlib close status codeFinish buffered output, release a writer and close its descriptor.Gzip files↗gzdirectTransparent-mode flag, not error statusReport whether the handle is using transparent data.Gzip files↗gzdopenOwned handle or failure sentinelWrap an existing descriptor without opening or duplicating it.Gzip files↗gzeofPast-EOF flagQuery whether a reader has tried to read beyond available data.Gzip files↗gzerrorBorrowed message pointer; optional error-code outputRead the handle's current error code and message.Gzip files↗gzflushzlib status codeProcess buffered output using the requested flush mode.Gzip files↗gzfreadComplete items readRead up to nitems items of size uncompressed bytes.Gzip files↗gzfwriteComplete accepted item countAccept up to nitems items of size uncompressed bytes.Gzip files↗gzgetcUnsigned byte value, or failure/EOF sentinelRead one uncompressed byte as an unsigned value.Gzip files↗gzgetc_Unsigned byte value, or failure/EOF sentinelProvide the exported wrapper for single-byte reading.Gzip files↗gzgetsCaller buffer pointer, or NULLRead a line fragment and terminate it with NUL.Gzip files↗gzoffsetPhysical file offset, or failure sentinelQuery physical file offset using z_off_t.Gzip files↗gzoffset64Physical file offset, or failure sentinelQuery the underlying physical file offset.Gzip files↗gzopenOwned handle or failure sentinelOpen a path for reading, writing or appending.Gzip files↗gzopen64Owned handle or failure sentinelOpen using the large-file entry point.Gzip files↗gzopen_wOwned handle or failure sentinelOpen a Windows wide-character path.Gzip files · Windows↗gzprintfFormatted byte count, zero, or zlib error codeFormat arguments and accept the resulting bytes for output.Gzip files↗gzputcAccepted byte value or failure sentinelAccept the low eight bits of c for output.Gzip files↗gzputsAccepted string byte count or failure sentinelAccept a NUL-terminated string, excluding its terminator.Gzip files↗gzreadUncompressed byte count, or failure sentinelRead up to len uncompressed bytes.Gzip files↗gzrewindRewind success/failure sentinelReset a reader to its saved descriptor start.Gzip files↗gzseekRequested uncompressed position, or failure sentinelRequest an uncompressed position through the ordinary offset type.Gzip files↗gzseek64Requested uncompressed position, or failure sentinelRequest an uncompressed position relative to start or current position.Gzip files↗gzsetparamszlib status codeRequest a new compression level and strategy for subsequent input.Gzip files↗gztellLogical uncompressed position; -1 can also signal failureQuery logical uncompressed position using z_off_t.Gzip files↗gztell64Logical uncompressed position; -1 can also signal failureQuery the current logical uncompressed position.Gzip files↗gzungetcOriginal nonnegative argument, or failure sentinelPush one byte onto a reader's uncompressed input.Gzip files↗gzvprintfFormatted byte count, zero, or zlib error codeFormat a va_list and accept the result for output.Gzip files↗gzwriteAccepted uncompressed byte countAccept len uncompressed bytes for output.Gzip files↗inflatezlib status codeConsume compressed bytes and write decoded bytes, preserving state across calls.Decompression streams↗inflateBackzlib status codePurpose. Decode one complete raw stream through the input and output callbacks.Callback decoding↗inflateBackEndzlib status codePurpose. Release the state allocated by callback init.Callback decoding↗inflateBackInit_zlib status codePurpose. Allocate decoder state and attach the caller's window. The inflateBackInit macro supplies version and stream_size.Callback decoding↗inflateCodesUsedDecoding-table entry count or error sentinelReport the decoding-table entries used so far. This is an undocumented entry point. The unit is a table entry, not a bit or a byte: one entry records the symbol or the next operation that one table lookup yields.Decompression streams↗inflateCopyzlib status codeCreate a decoder that can resume from the source position.Decompression streams↗inflateEndzlib status codeRelease decoder storage, including when decoding was abandoned or failed.Decompression streams↗inflateGetDictionaryzlib status codeRead the retained sliding history, oldest byte first.Decompression streams↗inflateGetHeaderzlib status codeRegister caller storage for the next gzip header.Decompression streams↗inflateInit2_zlib status codeCreate a decoder with a selected wrapper and window.Decompression streams↗inflateInit_zlib status codeCreate a zlib decoder with a 32 KiB maximum window.Decompression streams↗inflateMarkPacked position and progress, or an overlapping error sentinelReport the current code position for indexing.Decompression streams↗inflatePrimezlib status codeSupply bits before the next input byte, or clear buffered bits.Decompression streams↗inflateResetzlib status codeStart a new independent compressed stream using the existing configuration.Decompression streams↗inflateReset2zlib status codeReset and select a new wrapper and maximum window size.Decompression streams↗inflateResetKeepzlib status codeRestart decoding while retaining history. This is an undocumented entry point.Decompression streams↗inflateSetDictionaryzlib status codeInstall or amend the bytes available for backward matches.Decompression streams↗inflateSynczlib status codeSearch for a possible full-flush boundary after damaged input.Decompression streams↗inflateSyncPointState query value or error codeTest whether stored-block length bytes are the next thing expected.Decompression streams↗inflateUnderminezlib status codeRequest the optional permissive-distance mode. This is an undocumented entry point.Decompression streams↗inflateValidatezlib status codeEnable or disable wrapper checksum and gzip length validation.Decompression streams↗uncompresszlib status code; counts are reported through length parametersThe uLong decoder without a consumed-input count.Buffers and library information↗uncompress2zlib status code; counts are reported through length parametersThe uLong decoder with an input-consumption count.Buffers and library information↗uncompress2_zzlib status code; counts are reported through length parametersDecodes the first zlib stream and reports both output size and input consumption.Buffers and library information↗uncompress_zzlib status code; counts are reported through length parametersDecodes without exposing the consumed-input count.Buffers and library information↗zErrorBorrowed immutable error-text pointerReturns the text associated with a zlib result code.Buffers and library information↗zlibCompileFlagsBuild-information bit fieldsReports the build's type sizes and compile-time options.Buffers and library information↗zlibVersionBorrowed immutable version-string pointerReturns the linked library's release string.Buffers and library information↗No matches. Try part of a function name.