JSPM

bun-compression

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 163
  • Score
    100M100P100Q76833F
  • License MIT

Hono Compression plugin for Bun

Package Exports

  • bun-compression

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.