/** * Minimal ISOBMFF (ISO Base Media File Format) reader for the boxes AVIF/HEIC * use to store metadata. This is shared parsing machinery; the AVIF-specific * XMP logic lives in `avif.ts`. * * A box is: size(4, big-endian) + type(4 ASCII) + payload. size===1 means a * 64-bit largesize follows the type; size===0 means "to end of file". A FullBox * additionally begins its payload with version(1) + flags(3). */ export interface Box { type: string; /** Offset of the box's size field. */ start: number; /** 8, or 16 when a 64-bit largesize is used. */ headerSize: number; /** Total box length including header. */ size: number; } export declare function fourccAt(b: Uint8Array, o: number): string; export declare function dv(b: Uint8Array): DataView; /** Read a big-endian unsigned integer of `n` bytes (n ≤ 8, value < 2^53). */ export declare function readUintBE(b: Uint8Array, o: number, n: number): number; /** Parse the sequence of boxes in [start, end). */ export declare function parseBoxes(b: Uint8Array, start: number, end: number): Box[]; /** First child box of a container box (skips the FullBox version+flags if told to). */ export declare function childBoxes(b: Uint8Array, box: Box, fullBox?: boolean): Box[]; export declare function find(boxes: Box[], type: string): Box | undefined; /** Read a NUL-terminated string starting at `o`; returns text and the index after the NUL. */ export declare function readCString(b: Uint8Array, o: number, end: number): { str: string; next: number; };