Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions extensions/community_extensions/agentic-audiences.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ function floats32ToBase64(arr) {
const view = new DataView(buffer);
arr.forEach((x, i) => view.setFloat32(i * 4, x, true)); // little-endian
const bytes = new Uint8Array(buffer);
let binary = "";
for (const b of bytes) binary += String.fromCharCode(b);
// apply() converts all bytes in one call, avoiding per-byte string re-allocations.
// For very large inputs, chunk into ~8192-byte blocks to stay within engine argument limits.
const binary = String.fromCharCode.apply(null, bytes);
return btoa(binary);
}

Expand Down