zlib

A widely used C library for DEFLATE and gzip compression; in Node.js, node:zlib also provides Brotli.

In more detail

node:zlib offers one-call functions such as gzipSync() and gunzipSync(), promise and callback versions, and streams such as createGzip(). The Sync versions block the event loop, so servers should use the streaming or asynchronous forms.

Related terms

Taught in

References