fix: remove incorrect alignment comment in utf8ToBase64

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
faber
2026-07-10 21:53:10 -04:00
parent 0fcc33f9eb
commit 2658bf15e4

View File

@@ -462,7 +462,7 @@ async function sha256Hex(str: string): Promise<string> {
// creating a single enormous string via Array.from() on the full input.
function utf8ToBase64(content: string): string {
const bytes = new TextEncoder().encode(content)
const CHUNK = 32 * 1024 // 32 KiB — 3-byte aligned (32768 % 3 = 0)
const CHUNK = 32 * 1024
let binStr = ''
for (let i = 0; i < bytes.length; i += CHUNK) {
const slice = bytes.subarray(i, Math.min(i + CHUNK, bytes.length))