Socket
Socket
Sign inDemoInstall

inflation

Package Overview
Dependencies
Maintainers
1
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


Version published
Weekly downloads
1.1M
increased by8.37%
Maintainers
1
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

FAQs

Package last updated on 24 Apr 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc