Gusb3ll / elysia-compression

Compression plugin for elysia
https://www.npmjs.com/package/elysia-compression
MIT License
21 stars 8 forks source link
bun compression elysia

elysia-compression

Compression plugin for elysia

Installation

bun add elysia-compression

Example

import { Elysia } from 'elysia'
import { compression } from 'elysia-compression'

const app = new Elysia().use(compression()).listen(8080)

Config

type

@default gzip

The type of compression to use. Can be one of the following:

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.