inflation
Easily unzip an HTTP stream
Last updated 2 years ago by fengmk2 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install inflation 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 2.1.0                                ...           latest (2 years ago)

5 Versions

  • 2.1.0                                ...           2 years ago
  • 2.0.0                                ...           10 years ago
  • 1.0.2                                ...           12 years ago
  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (5)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |