import type { Plugin } from './app'; /** Options for {@link compression}. */ export interface CompressionOptions { /** Minimum response size, in bytes, worth compressing; smaller bodies pass through untouched. Default 1024. */ threshold?: number; /** * Extra `Content-Type` substrings to treat as compressible (matched with * `includes`), on top of the built-in `text/*`, JSON, JavaScript, and XML types. */ types?: string[]; } /** * Plugin: gzip-compress text-like responses when the client accepts it and the * body is worth compressing. Sets `Content-Encoding: gzip` and `Vary: * Accept-Encoding`; skips already-encoded, small, or non-text responses. The * body is buffered to compress it, so pair it with normal JSON/HTML responses * rather than large streams. * * ```ts * const app = await createApp({ plugins: [compression()] }) * ``` * * @param options - tune the size `threshold` and add compressible content * `types`; defaults compress text/JSON/JavaScript/XML bodies of at least 1 KB * @returns a plugin whose interceptor gzips eligible responses */ export declare function compression(options?: CompressionOptions): Plugin; //# sourceMappingURL=compression.d.ts.map