Implements the permessage-deflate WebSocket protocol extension for compression of WebSocket messages. Version 0.1.7 is the latest stable release, last updated in 2018. It is designed as a plugin for the websocket-extensions library, providing per-message DEFLATE compression. Unlike alternative compression approaches, it follows the IETF hybi-permessage-compression draft and integrates seamlessly with the Faye WebSocket ecosystem. The package supports configuration of zlib compression levels, memory levels, strategies, context takeover, and window bits.
npm install permessage-deflateNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a WebSocket extensions instance and add the permessage-deflate plugin for compression.
Replace import statements with const/var ... = require('permessage-deflate')Consider using ws library's built-in permessage-deflate support if available
Call configure() once and reuse the returned object, or create a clone
Run: npm install websocket-extensions
var deflate = require('permessage-deflate'); var configured = deflate.configure({});var Extensions = require('websocket-extensions'); var exts = new Extensions();