Gathering detailed insights and metrics for permessage-deflate
Gathering detailed insights and metrics for permessage-deflate
Gathering detailed insights and metrics for permessage-deflate
Gathering detailed insights and metrics for permessage-deflate
Per-message DEFLATE compression extension for WebSocket connections
npm install permessage-deflate
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
9,509,505
Last Day
8,062
Last Week
65,803
Last Month
252,378
Last Year
2,481,658
NOASSERTION License
27 Stars
71 Commits
8 Forks
6 Watchers
2 Branches
1 Contributors
Updated on May 18, 2025
Minified
Minified + Gzipped
Latest Version
0.1.7
Package Id
permessage-deflate@0.1.7
Size
5.10 kB
NPM Version
6.9.0
Node Version
12.4.0
Published on
Jun 10, 2019
Cumulative downloads
Total Downloads
Last Day
-10.6%
8,062
Compared to previous day
Last Week
-22.6%
65,803
Compared to previous week
Last Month
21.2%
252,378
Compared to previous month
Last Year
25.9%
2,481,658
Compared to previous year
1
1
Implements the permessage-deflate WebSocket protocol extension as a plugin for websocket-extensions.
$ npm install permessage-deflate
Add the plugin to your extensions:
1var Extensions = require('websocket-extensions'), 2 deflate = require('permessage-deflate'); 3 4var exts = new Extensions(); 5exts.add(deflate);
The extension can be configured, for example:
1var Extensions = require('websocket-extensions'), 2 deflate = require('permessage-deflate'), 3 zlib = require('zlib'); 4 5deflate = deflate.configure({ 6 level: zlib.Z_BEST_COMPRESSION, 7 maxWindowBits: 13 8}); 9 10var exts = new Extensions(); 11exts.add(deflate);
The set of available options can be split into two sets: those that control the session's compressor for outgoing messages and do not need to be communicated to the peer, and those that are negotiated as part of the protocol. The settings only affecting the compressor are described fully in the zlib documentation:
level
: sets the compression level, can be an integer from 0
to 9
, or one
of the constants zlib.Z_NO_COMPRESSION
, zlib.Z_BEST_SPEED
,
zlib.Z_BEST_COMPRESSION
, or zlib.Z_DEFAULT_COMPRESSION
memLevel
: sets how much memory the compressor allocates, can be an integer
from 1
to 9
, or one of the constants zlib.Z_MIN_MEMLEVEL
,
zlib.Z_MAX_MEMLEVEL
, or zlib.Z_DEFAULT_MEMLEVEL
strategy
: can be one of the constants zlib.Z_FILTERED
,
zlib.Z_HUFFMAN_ONLY
, zlib.Z_RLE
, zlib.Z_FIXED
, or
zlib.Z_DEFAULT_STRATEGY
The other options relate to settings that are negotiated via the protocol and can be used to set the local session's behaviour and control that of the peer:
noContextTakeover
: if true
, stops the session reusing a deflate context
between messagesrequestNoContextTakeover
: if true
, makes the session tell the other peer
not to reuse a deflate context between messagesmaxWindowBits
: an integer from 8
to 15
inclusive that sets the maximum
size of the session's sliding window; a lower window size will be used if
requested by the peerrequestMaxWindowBits
: an integer from 8
to 15
inclusive to ask the other
peer to use to set its maximum sliding window size, if supportedNo vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More