Socket
Socket
Sign inDemoInstall

inflation

Package Overview
Dependencies
0
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

inflation

Easily unzip an HTTP stream


Version published
Maintainers
3
Weekly downloads
998,416
decreased by-2.64%

Weekly downloads

Readme

Source

inflation

NPM version CI

Automatically unzip an HTTP stream.

API

var inflate = require('inflation')

inflate(stream, options)

Returns a stream that emits inflated data from the given stream.

Options:

  • encoding - The encoding of the stream (gzip or deflate). If not given, will look in stream.headers['content-encoding'].
  • brotli - BrotliOptions to use for Brotli decompression

Example

var inflate = require('inflation')
var raw     = require('raw-body')

http.createServer(function (req, res) {
  raw(inflate(req), 'utf-8', function (err, string) {
    console.dir(string)
  })
})

Contributors


dougwilson


bminer


fengmk2

This project follows the git-contributor spec, auto updated at Sat Oct 14 2023 12:55:08 GMT+0800.

Keywords

FAQs

Last updated on 14 Oct 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc