Gathering detailed insights and metrics for compress-brotli
Gathering detailed insights and metrics for compress-brotli
Gathering detailed insights and metrics for compress-brotli
Gathering detailed insights and metrics for compress-brotli
Simple cross Node.js inteface for using brotli compression
npm install compress-brotli
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
42 Stars
82 Commits
5 Forks
2 Watchers
1 Branches
3 Contributors
Updated on May 24, 2025
Latest Version
1.3.13
Package Id
compress-brotli@1.3.13
Unpacked Size
9.32 kB
Size
3.50 kB
File Count
6
NPM Version
10.9.2
Node Version
22.15.0
Published on
May 24, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Compress/Decompress using Brotli in a simple way.
undefined
).1$ npm install compress-brotli --save
1const createCompress = require('compress-brotli') 2 3// It exposes compress/decompress methods 4const { compress, decompress } = createCompress()
using v8 serialization:
1const createCompress = require('compress-brotli') 2const v8 = require('v8') 3 4const { compress, decompress } = createCompress({ 5 serialize: v8.serialize, 6 deserialize: v8.deserialize 7})
customizing compress options:
1const createCompress = require('compress-brotli') 2 3const { 4 constants: { 5 BROTLI_MODE_TEXT, 6 BROTLI_PARAM_MODE, 7 BROTLI_PARAM_QUALITY 8 } 9} = require('zlib') 10 11// Provide factory level default options 12const { compress, decompress } = createCompress({ 13 compressOptions: { 14 chunkSize: 1024, 15 parameters: { 16 [BROTLI_PARAM_MODE]: BROTLI_MODE_TEXT 17 } 18 }, 19 decompressOptions: { 20 chunkSize: 1024, 21 parameters: { 22 [BROTLI_PARAM_MODE]: BROTLI_MODE_TEXT 23 } 24 } 25}) 26const data = 'whatever' 27 28// Override call level options (deep merge for parameters) 29const compressed = compress(data, { 30 parameters: { 31 [BROTLI_PARAM_QUALITY]: 7 32 } 33}) 34decompress(compressed, { 35 chunkSize: 2048 36})
Type: boolean
Default: false
If pass disable, it will return a noop compress/decompress methods.
Type: function
Default: JSONB.stringify
It determines the serialize method to use before compress the data.
Type: function
Default: JSONB.parse
It determines the deserialize method to use after decompress the data.
Type: zlib.BrotliOptions
Default: {}
i.e. default zlib.brotliCompress options will be used
It defines default options to be used in wrapped zlib.brotliCompress call
Type: zlib.BrotliOptions
Default: {}
i.e. default zlib.brotliDecompress options will be used
It defines default options to be used in wrapped zlib.brotliDecompress call
compress-brotli © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.
kikobeats.com · GitHub Kiko Beats · X @Kikobeats
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2
Reason
Found 1/21 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
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