https://github.com/portkey-ai/hono-compress-fast
A fast compress middleware for hono and nodejs
https://github.com/portkey-ai/hono-compress-fast
Last synced: about 1 month ago
JSON representation
A fast compress middleware for hono and nodejs
- Host: GitHub
- URL: https://github.com/portkey-ai/hono-compress-fast
- Owner: Portkey-AI
- License: mit
- Created: 2025-06-13T13:52:36.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-17T18:19:06.000Z (about 1 year ago)
- Last Synced: 2025-11-06T12:14:06.644Z (9 months ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hono-compress-fast
> Ultra-light Brotli / gzip / deflate compression middleware for Hono.
```ts
import { Hono } from 'hono'
import { compressFast } from 'hono-compress-fast'
const app = new Hono()
app.use(compressFast({ threshold: 1024 }))
````
* **Fast** – streams via Node zlib Brotli when available.
* **Portable** – falls back to Web CompressionStream (gzip/deflate) in Deno, Bun, Workers.
* **Zero deps** – no WASM, no native bindings.
## Install
```bash
npm add hono-compress-fast # or pnpm / yarn / bun
```
## API
...