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

0.0.7 • Public • Published

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:

  • 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.

Readme

Keywords

Package Sidebar

Install

npm i elysia-compression

Weekly Downloads

549

Version

0.0.7

License

MIT

Unpacked Size

14 kB

Total Files

18

Last publish

Collaborators

  • gusb3ll