bun-compression
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

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.

Dependents (0)

Package Sidebar

Install

npm i bun-compression

Weekly Downloads

223

Version

0.0.4

License

MIT

Unpacked Size

12.3 kB

Total Files

18

Last publish

Collaborators

  • sunney