Posted On: Jan 22, 2023
Zlib is Cross-platform data compression library. It was written by Jean-loup Gailly and Mark Adler. In Node js, you can Zlib for Threadpool, HTTP requests, and responses compression and Memory Usage Tuning. In order to use zlib in node js, you need to install node-zlib package. After installation below is sample code to use Zlib.
var Buffer = require('buffer').Buffer; var zlib = require('zlib'); var input = new Buffer('compressed input from Zlib'); var compressed = zlib.deflate(input); var output = zlib.inflate(compressed);
Further Reading https://nodejs.org/api/zlib.html
https://en.wikipedia.org/wiki/Zlib
Never Miss an Articles from us.
Node Js is one of the most popular and powerful server technologies today. It allows you built the entire website only..
CLI stands for Command Line Interface. It is a utility or program on your computer where users type commands to perform..
Node js is written in C, C++,JavaScript.It uses Google’s open source V8 Javascript Engine to convert Javascript code..