Skip to content
masterclass Buddy

Node.js · Module

node:zlib

The node:zlib module compresses and decompresses data with Gzip, Deflate/Inflate, Brotli, and Zstd. It supports both streams and one-step buffer operations.

Last updated

Since
v0.10.0

Syntax

import zlib from 'node:zlib';
const zlib = require('node:zlib');

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • createGzip
  • createGunzip
  • createDeflate
  • createInflate
  • createBrotliCompress
  • createBrotliDecompress
  • createZstdCompress
  • createZstdDecompress

Source: Zlib | Node.js v26.13.0 Documentation. Checked 2026-11-03.