🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
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

latest
Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
1.7M
13.62%
Maintainers
3
Weekly downloads
 
Created
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

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