permessage-deflate2

JSON →
library 0.1.8 ·javascript
verified Jun 7, 2026

A WebSocket permessage-deflate compression extension plugin for websocket-extensions, with a threshold option to skip compressing small messages. Version 0.1.8 requires Node >=20.0.0. It implements the IETF draft for permessage-deflate compression, allowing configuration of compression level, memory level, strategy, window bits, and context takeover. The key differentiator from the original permessage-deflate is the addition of a threshold option (default 0) to avoid wasting CPU on tiny payloads.