📅  最后修改于: 2022-03-11 15:03:35.227000             🧑  作者: Mango
function fromBinary(encoded) {
binary = atob(encoded)
const bytes = new Uint8Array(binary.length);
for (let i = 0; i < bytes.length; i++) {
bytes[i] = binary.charCodeAt(i);
}
return String.fromCharCode(...new Uint16Array(bytes.buffer));
}
// our previous Base64-encoded string
let decoded = fromBinary(encoded) // "â à la mode"