Socket
Socket
Sign inDemoInstall

bun-compression

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bun-compression

Hono Compression plugin for Bun


Version published
Weekly downloads
23
decreased by-36.11%
Maintainers
1
Install size
12.0 kB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 15 Feb 2024

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc