
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
@abaccus/koapression
Advanced tools
Koa Compression middleware.
The following compression codings are supported:
This is a Node.js module available through the
npm registry. Installation is done using the
npm install
command:
$ npm install @abaccus/koapression
const koapression = require('@abaccus/koapression')
const koapression = require('@abaccus/koapression')
const Koa = require('koa')
const app = new Koa()
app.use(compress({
filter: function (content_type) {
return /text/i.test(content_type)
},
threshold: 2048,
flush: require('zlib').Z_SYNC_FLUSH
}))
The options are passed to zlib
: http://nodejs.org/api/zlib.html#zlib_options
An optional function that checks the response content type to decide whether to compress. By default, it uses compressible.
Minimum response size in bytes to compress.
Default 1024
bytes or 1kb
.
You can always enable compression by setting this.compress = true
.
You can always disable compression by setting this.compress = false
.
This bypasses the filter check.
app.use((ctx, next) => {
ctx.compress = true
ctx.body = fs.createReadStream(file)
})
FAQs
Koa compression middleware
We found that @abaccus/koapression demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.