Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

inflation

Package Overview
Dependencies
Maintainers
2
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.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
898K
decreased by-15.48%
Maintainers
2
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 09 Apr 2016

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