/** * Optimize an AVIF byte stream by re-muxing the container. Returns the * smaller of the original and the re-muxed output. * * On any parse/serialize failure, the original input is returned unchanged. */ export declare function optimize(input: Uint8Array, options?: OptimizeOptions): Uint8Array; /** * Same as `optimize()` but also returns a stats object describing what was * dropped — useful for UIs that want to show the user `−15 % (Exif + thumbnail)`. */ export declare function optimizeWithStats(input: Uint8Array, options?: OptimizeOptions): OptimizeResult; /** * Force re-muxing without the smaller-of-two guard. Always returns a fresh * buffer; callers that want to keep the original on bloat should use * `optimize()` instead. */ export declare function remux(input: Uint8Array, options?: OptimizeOptions): Uint8Array; export declare interface OptimizeOptions { preserveMetadata?: boolean } /** Per-call summary of what the optimizer touched. */ export declare interface OptimizeStats { passthrough: boolean keptItemIds: number[] droppedItemIds: number[] droppedItemTypes: string[] bytesSaved: number reason?: string } export declare interface OptimizeResult { bytes: Uint8Array stats: OptimizeStats }