Skip to content

Taxum / @taxum/core / middleware/compression / sizeAbovePredicate

Function: sizeAbovePredicate()

sizeAbovePredicate(minSize): Predicate

Defined in: middleware/compression.ts:353

Predicate that will only allow compression of responses above a certain size.

The content size is determined through either the body size or the content-length header. If neither can be determined (e.g., the body is a Readable), the response will always be compressed.

Parameters

minSize

number

Returns

Predicate