bun-compression
v0.0.4
Published
Hono Compression plugin for Bun
Downloads
789
Readme
bun-compression
Compression plugin for Hono
Installation
bun add bun-compression
Example
import { Hono } from 'hono'
import { compress } from 'bun-compression'
const app = new Hono()
app.use('*', compress())
Config
type
@default gzip
The type of compression to use. Can be one of the following:
gzip
deflate
options
@default {}
Options passed to the compression library.
Refer to the bun zlib options documentation for more details.
encoding
@default utf-8
The encoding of the response body that is being compressed.
Acknowledgments
This project is inspired by elysia-compression by gusb3ll. Adaptations have been made to support Hono.