Commit Graph
1 Commits
Author SHA1 Message Date
8aace78beb fix(base64_encode): encode large input in browser builds (#969)
The browser base64Encode spread every UTF-8 byte of its input into a
single String.fromCharCode call, one argument per byte, so input past
the engine's argument limit threw: past ~125 KB on V8 ("Maximum call
stack size exceeded") and past 64 KB on engines that cap arguments at
65535, such as QuickJS. It now converts the bytes in 32 KB chunks. The
node build, which encodes with Buffer, is unchanged.

Fixes #967

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-02 01:43:08 +08:00