Zlib
The zlib module provides compression and decompression using the gzip format. Essential for saving bandwidth and storage. The guide walks through Compression Basics. `import zlib from "zlib"` (Node.js). `zlib.gzip(data, callback)` — compress. `zlib.gunzip(data, callback)` — decompress. `zlib.deflate` / `zlib.inflate` — raw deflate. `zlib.brotliCompress` — Brotli (better compression). Promisify: `const gzip = util.promisify(zlib.gzip)`. Use for: HTTP response compression, file archiving, reducing data size. The guide is organized into 1 sections that build on each other, each pairing a prose explanation with runnable code. Related guides: builtins, string, list, dict, os. This is one of 48 Python guides on Python Reference — see the full list on the guides page. Practice what you learn in the Python playground, and look up any unfamiliar term in the Python glossary.