Skip to content

ZLIB

This module handles data compression and decompression in GZip and Inflate.

Sample

const zlib = require("zlib");
const content = encodeURIComponent("sample string");// encoding
const result = zlib.gzipSync(content); // compression
const value = result.toString('base64'); // Buffer => base64 conversion