/** * Lightweight MIME type detection from magic bytes (file signatures). * * Designed for the blob store's auto-detection feature. Operates on the first 16 bytes of * plaintext — no filesystem access, no filename guessing. * * ## Detection strategies * * 1. **Prefix match** — magic bytes at offset 0 (most formats). * 2. **Offset match** — magic bytes at a fixed offset > 0 (ISOBMFF: offset 4). * 3. **Compound match** — two separate byte sequences at different offsets * (RIFF-based: bytes 0-3 + bytes 8-11). * * ## Formats excluded (require offset > 16 bytes) * * - TAR (`ustar` at offset 257) * - ISO 9660 (`CD001` at offset 32769) * * @module */ /** * Detect MIME type from the first bytes of a file. * * @param header - The first 16 bytes (or more) of the plaintext. Passing * fewer than 16 bytes may miss compound and offset-based matches. * @returns Detected MIME type, or `'application/octet-stream'` if unknown. */ export declare function detectMimeType(header: Uint8Array): string; /** * Detect MIME type and whether the format is already compressed. * * Used by `BlobSet.put()` to decide whether to skip gzip compression. * * @param header - The first 16 bytes (or more) of the plaintext. * @returns `{ mime, preCompressed }` or `null` if no match. */ export declare function detectMagic(header: Uint8Array): { mime: string; format: string; preCompressed: boolean; } | null; /** * Check whether a format is already compressed (should skip gzip). * * @param mimeType - A MIME type string. * @returns `true` if the format is known to be pre-compressed. */ export declare function isPreCompressed(mimeType: string): boolean;