You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
925 B
925 B
inflation
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
ordeflate
). If not given, will look instream.headers['content-encoding']
.
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)
})
})