/** * Base64-encode raw bytes for `data:` URIs (the svg + html writers). `btoa` is * available in browsers, workers and Node 16+; chunking keeps the intermediate * binary string small. */ export declare function toBase64(bytes: Uint8Array): string; /** * Whether the ZIP in `bytes` holds a part named `partName` โ€” the name exactly, * or anything under it when `partName` names a directory (ends with `/`). * * This is what a reader sniff should ask. A substring probe cannot tell a * package from one EMBEDDED in it: a deck with a chart carries the chart's * workbook as `ppt/embeddings/*.xlsx` STORED, uncompressed, so that workbook's * own `xl/workbook.xml` sits in the outer file's bytes verbatim โ€” and the xlsx * sniff, which runs before the pptx one, claimed thirteen corpus presentations * and then failed on them. The ZIP's central directory lists what is actually * in this package, and walking that entry table is cheaper than scanning every * byte for a needle. * * Names are compared without case, as OPC compares part names (ยง9.1.1.1) and * as the package reader behind the sniff resolves them. * * @param bytes The package bytes. * @param partName The part name, or a `/`-terminated directory prefix. * @returns Whether the package's directory names it. */ export declare function packageHasPart(bytes: Uint8Array, partName: string): boolean; /** * Scan raw package bytes for an OPC part name (e.g. `'xl/workbook.xml'`) * without unzipping. Prefer {@link packageHasPart}, which asks the archive * what it holds instead of hoping the name appears nowhere else. Accepts both * the spec's `/` separator and the `\` that Windows producers write. */ export declare function bytesIncludePartName(haystack: Uint8Array, partName: string): boolean; /** * Naive scan for an ASCII `needle` inside raw `haystack` bytes. Prefer * {@link bytesIncludePartName} for OPC part names โ€” it also accepts the * backslash spelling real archives use. */ export declare function bytesInclude(haystack: Uint8Array, needle: string): boolean;