HTTP Content Encoding Handler

JSON →
library 2.2.0 ·javascript
verified May 27, 2026

The `http-encoding` package provides a robust and consistent API for handling HTTP message body `Content-Encoding` headers. It supports a comprehensive set of common encodings, including Gzip, raw Deflate (with or without zlib wrappers), Brotli, Zstandard (Zstd), and Base64. The library is compatible with Node.js environments (specifically `>=v18.0.0`) and modern browsers, offering both promise-based buffer APIs (`decodeBuffer`, `encodeBuffer`) and web-standard `TransformStream` streaming APIs (`createDecodeStream`, `createEncodeStream`). It intelligently leverages native `CompressionStream` and `DecompressionStream` APIs for performance where available. All encoding names are handled case-insensitively, and various no-op encodings like 'identity' are explicitly supported. Currently at version 2.2.0, it is actively maintained as part of the broader HTTP Toolkit ecosystem. Its primary differentiator is its unified API for multiple complex encoding schemes, making it ideal for tasks involving HTTP proxying, inspection, or manipulation.

total hits 15
actors 7 distinct systems
last hit 7h ago human
MetaBot
4
GPTBot
2
Script
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇫🇷 France · 🇨🇦 Canada · 🇪🇸 Spain