Encode a Uint8Array to base64 without using spread arguments — safe for arbitrarily large buffers (no call-stack size limit).
Uses the WHATWG btoa API which is available in all target runtimes. Processes the buffer in chunks to avoid allocating a single huge string.
btoa
The buffer to encode.
Base64-encoded string.
Encode a Uint8Array to base64 without using spread arguments — safe for arbitrarily large buffers (no call-stack size limit).
Uses the WHATWG
btoaAPI which is available in all target runtimes. Processes the buffer in chunks to avoid allocating a single huge string.