/** * Decode a base64 string to `Uint8Array`. * * Prefers Node's `Buffer.from(b64, 'base64')` when available — measurably * faster than the per-byte `atob` loop for the multi-MB S3 mount and * federated-VFS payloads the CLI float moves. The browser / extension * service-worker fallback round-trips through `atob`, which is a * universal global. * * Two normalizations bridge the platform gap so both paths are * observationally identical: * - the Node path copies the `Buffer` into a fresh `Uint8Array` so the * caller gets a plain prototype backed by a standalone `ArrayBuffer` * (not Node's slab pool, which `Buffer.from` draws from for small * inputs) — callers that read `.buffer` downstream and tests that * deep-equal the bytes both need this; * - the Node path validates against {@link STRICT_BASE64_RE} first and * throws on invalid input. `atob` already throws; `Buffer.from` * silently strips invalid characters, which would let bad payloads * through callers that rely on the decoder rejecting them. */ export declare function base64ToUint8(b64: string): Uint8Array; /** * Encode a `Uint8Array` to a base64 string. * * Prefers Node's `Buffer.from(bytes).toString('base64')` when available. * Otherwise builds the binary string in {@link CHUNK_SIZE}-byte chunks * through `String.fromCharCode.apply` — the unchunked spread overflows * the call stack on inputs larger than ~64 KiB. */ export declare function uint8ToBase64(bytes: Uint8Array): string; //# sourceMappingURL=base64.d.ts.map