decompress-response (4.2.1)
Published 2026-02-24 13:55:14 +00:00 by atheaadmin
Installation
registry=npm install decompress-response@4.2.1"decompress-response": "4.2.1"About this package
decompress-response 
Decompress a HTTP response if needed
Decompresses the response from http.request if it's gzipped, deflated or compressed with Brotli, otherwise just passes it through.
Used by got.
Install
$ npm install decompress-response
Usage
const http = require('http');
const decompressResponse = require('decompress-response');
http.get('https://sindresorhus.com', response => {
response = decompressResponse(response);
});
API
decompressResponse(response)
Returns the decompressed HTTP response stream.
response
Type: http.IncomingMessage
The HTTP incoming stream with compressed data.
Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
Dependencies
Dependencies
| ID | Version |
|---|---|
| mimic-response | ^2.0.0 |
Development Dependencies
| ID | Version |
|---|---|
| @types/node | ^12.7.1 |
| ava | ^2.2.0 |
| get-stream | ^5.0.0 |
| pify | ^4.0.1 |
| tsd | ^0.7.1 |
| xo | ^0.24.0 |
Keywords
decompress
response
http
https
zlib
gzip
zip
deflate
unzip
ungzip
incoming
message
stream
compressed
brotli