Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/src/binaryDecode.js
6165 views
1
// Prevent Closure from minifying the binaryDecode() function, or otherwise
2
// Closure may analyze through the WASM_BINARY_DATA placeholder string into this
3
// function, leading into incorrect results.
4
/** @noinline */
5
function binaryDecode(bin) {
6
for (var i = 0, l = bin.length, o = new Uint8Array(l), c; i < l; ++i) {
7
c = bin.charCodeAt(i);
8
o[i] = ~c >> 8 & c; // Recover the null byte in a manner that is compatible with https://crbug.com/453961758
9
}
10
return o;
11
}
12
13