📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

bun-compression

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bun-compression

Hono Compression plugin for Bun

0.0.6
latest
Source
npm
Version published
Weekly downloads
446
268.6%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

hono

FAQs

Package last updated on 15 Apr 2025

Did you know?

Socket

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.

Install

Related posts