[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

stream-utils/inflation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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


jonathanong


dougwilson


fengmk2


bminer


ide

This project follows the git-contributor spec, auto updated at Sat Oct 14 2023 13:02:29 GMT+0800.