/** * Default maximum decompressed body size (10 MB). */ export declare const DEFAULT_MAX_BODY_SIZE: number; /** * Parse a request body as JSON, handling Content-Encoding decompression * and enforcing a decompressed body size limit for compressed requests. * * For plain (uncompressed) requests, body size enforcement is expected to be * handled by the parent framework (e.g. Hono's `bodyLimit` middleware, or * Bun/Node server-level `maxRequestBodySize`). This utility only enforces * `maxBodySize` on the *decompressed* output of gzip/deflate streams, since * the framework cannot know the decompressed size ahead of time. * * @param request - Incoming Web API Request * @param maxBodySize - Maximum decompressed body size in bytes. `0` disables the limit. Defaults to 10 MB. * @returns Parsed JSON body */ export declare function parseRequestBody(request: Request, maxBodySize?: number): Promise;