New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

inflation

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inflation

Easily unzip an HTTP stream

2.1.0
latest
Source
npm
Version published
Weekly downloads
908K
-22.27%
Maintainers
3
Weekly downloads
 
Created

What is inflation?

The 'inflation' npm package is used to handle HTTP content encoding. It automatically decompresses HTTP responses that are compressed using gzip, deflate, or other supported algorithms. This is particularly useful in web applications and APIs where data compression is commonly used to reduce the size of the payload.

What are inflation's main functionalities?

Automatic Decompression

This feature automatically decompresses incoming HTTP requests that are compressed using gzip, deflate, or other supported algorithms. The code sample demonstrates how to use the 'inflation' package to handle decompression in an HTTP server.

const http = require('http');
const inflation = require('inflation');

http.createServer((req, res) => {
  req = inflation(req);
  let data = '';
  req.on('data', chunk => {
    data += chunk;
  });
  req.on('end', () => {
    res.end(data);
  });
}).listen(3000);

Other packages similar to inflation

Keywords

decompress

FAQs

Package last updated on 14 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts