Skip to content

Interface.HonoCompressOptions

github-actions[bot] edited this page Mar 4, 2026 · 1 revision

hono-compress / HonoCompressOptions

Interface: HonoCompressOptions

Defined in: types.ts:102

Properties

Property Type Description Defined in

encoding?

"zstd" | "br" | "gzip" | "deflate"

Algorithm to be used to compress the response content

types.ts:106

encodings?

("zstd" | "br" | "gzip" | "deflate")[]

List of algorithms allowed to be used to compress the response content

types.ts:111

fallback?

"zstd" | "br" | "gzip" | "deflate"

Algorithm to be used as fallback to compress the response content if no accept-encoding header is provided by the client

types.ts:116

force?

boolean

Forces content compression even if the response content-type cannot be determined and the cache-control is set to no-transform

types.ts:121

strict?

boolean

Disables response content compression if request header x-no-compression has been provided by the client

types.ts:126

streaming?

boolean

Enables to always streaming compressed response content

types.ts:131

bun?

boolean

Allows Bun compressor to be used

types.ts:136

node?

boolean

Allows Node compressor to be used

types.ts:141

threshold?

number

The minimum size in bytes for a response content to be compressed

types.ts:146

zstdLevel?

ZstdLevel

Zstandard algorithm compression level

types.ts:151

zstdOptions?

ZstdOptions

Zstandard algorithm compression options

types.ts:156

brotliLevel?

BrotliLevel

Brotli algorithm compression level

types.ts:161

brotliOptions?

BrotliOptions

Brotli algorithm compression options

types.ts:166

gzipLevel?

ZlibLevel

Gzip algorithm compression level

types.ts:171

gzipOptions?

ZlibOptions

Gzip algorithm compression options

types.ts:176

deflateLevel?

ZlibLevel

Deflate algorithm compression level

types.ts:181

deflateOptions?

ZlibOptions

Deflate algorithm compression options

types.ts:186

filter?

CompressionCallback

Custom override filtering function

types.ts:191

Clone this wiki locally