interface FastifyCompressOptions {
    brotliOptions?: BrotliOptions;
    customTypes?: RegExp | CompressibleContentTypeFunction;
    encodings?: EncodingToken[];
    forceRequestEncoding?: EncodingToken;
    global?: boolean;
    inflateIfDeflated?: boolean;
    onInvalidRequestPayload?: ((encoding, request, error) => undefined | null | Error);
    onUnsupportedEncoding?: ((encoding, request, reply) => string | Buffer | Stream);
    onUnsupportedRequestEncoding?: ((encoding, request, reply) => undefined | null | Error);
    removeContentLengthHeader?: boolean;
    requestEncodings?: EncodingToken[];
    threshold?: number;
    zlib?: unknown;
    zlibOptions?: ZlibOptions;
}

Properties

brotliOptions?: BrotliOptions
encodings?: EncodingToken[]
forceRequestEncoding?: EncodingToken
global?: boolean
inflateIfDeflated?: boolean
onInvalidRequestPayload?: ((encoding, request, error) => undefined | null | Error)

Type declaration

onUnsupportedEncoding?: ((encoding, request, reply) => string | Buffer | Stream)
onUnsupportedRequestEncoding?: ((encoding, request, reply) => undefined | null | Error)
removeContentLengthHeader?: boolean
requestEncodings?: EncodingToken[]
threshold?: number
zlib?: unknown
zlibOptions?: ZlibOptions