Node.js API compatibility - Zlib
Explore the integration and functionality of the Node.js Zlib module within the Azion Runtime. The Zlib module provides compression and decompression utilities using the Gzip and Deflate/Inflate algorithms.
The zlib module in Node.js provides a set of compression and decompression utilities for handling data in various formats. It’s built on the zlib library, which is widely used for data compression, and allows developers to efficiently compress and decompress data streams, making it essential for optimizing storage and network transmission. This module is available in the Azion Runtime through Node.js compatibility, so functions can use it to compress response payloads with Gzip or decompress incoming data closer to your users, reducing bandwidth usage.
The example below shows how to use the zlib module in a function: