export interface ContentTypeInfo { mime: string; isHtml: boolean; isImage: boolean; isPdf: boolean; isText: boolean; isJson: boolean; isSvg: boolean; isBinary: boolean; } /** * Detect MIME type by inspecting magic bytes at the start of a binary buffer. * * Checks known signatures (PNG, JPEG, GIF, BMP, WebP, PDF) and returns the * MIME type string on match, or `null` if nothing matches. * * @param buffer — The raw bytes to inspect (at least the first 12 bytes). * @returns The detected MIME type string, or `null`. */ export declare function detectMimeByMagic(buffer: Uint8Array): string | null; /** * Detect content type by combining the HTTP Content-Type header with magic * byte analysis of the response body. Returns a structured `ContentTypeInfo` * with convenience boolean flags. * * Strategy: * 1. Magic bytes take precedence when they detect a known format, overriding * the header for generic/mismatched types. * 2. If the Content-Type header provides a specific, non-generic MIME, trust it * (unless magic bytes detected something of a different category). * 3. If neither source yields a result, default to `application/octet-stream`. * * @param contentTypeHeader — The value of the Content-Type response header (or null). * @param bodyStart — The first few bytes of the response body (≥12 bytes preferred). * @returns A ContentTypeInfo record with the resolved MIME and boolean flags. */ export declare function detectContentType(contentTypeHeader: string | null, bodyStart: Uint8Array): ContentTypeInfo; //# sourceMappingURL=mime-detect.d.ts.map