Protected Audience bidding and scoring scripts that interface with WebAssembly need to efficiently convert string-typed data to (and from) byte arrays (e.g. to pass strings into and out of WebAssembly via the “memory” ArrayBuffer). This provides two standalone functions, protectedAudience.encodeUtf8, and protectedAudience.decodeUtf8 to perform these tasks about an order of magnitude more efficiently than doing it in JavaScript.