Skip to content
uencoder

zlib

zlib is the DEFLATE compression library (RFC 1950) maintained by Jean-loup Gailly and Mark Adler, providing an in-memory compression API; it underlies gzip.

Purpose

It gives applications an embeddable DEFLATE compression/decompression API with multiple compression levels and flush strategies.

Mechanism

A DEFLATE core plus a 2-byte header (CMF, FLG) and an ADLER32 checksum trailer. The API supports streaming compression, memory-level selection, and three wrappers: raw, deflate, and gzip.

Use cases

  • PNG image encoding
  • HTTP compression
  • OpenSSL TLS compression

Related tools

References