
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
@hono/bun-compress
Advanced tools
A Hono middleware for compressing responses using Bun's built-in compression.
Bun does not currently support the CompressionStream API so this middleware replicates the behavior of hono/compress using the Zlib library. This middleware will be deprecated once Bun adds support for CompressionStream.
This middleware will use hono/compress if CompressionStream is available so you can use this middleware in Bun and Node.js without any changes.
import { Hono } from 'hono'
import { compress } from '@hono/bun-compress'
const app = new Hono()
app.use(compress())
'gzip' | 'deflate'The compression scheme to allow for response compression. Either gzip or deflate. If not defined, both are allowed and will be used based on the Accept-Encoding header. gzip is prioritized if this option is not provided and the client provides both in the Accept-Encoding header.
numberThe minimum size in bytes to compress. Defaults to 1024 bytes.
FAQs
A Hono middleware for compressing responses using Bun's built-in compression.
The npm package @hono/bun-compress receives a total of 1,606 weekly downloads. As such, @hono/bun-compress popularity was classified as popular.
We found that @hono/bun-compress demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.