{"ScriptPreparationCode":"var str = \u0022aa34a5b6c5acb67acb5acb678acb6ac4b5a6c7b5a4c3b45a67c8b76a54cb34a5c6b7\u0022;\r\n\r\nvar chars = \u0022ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\u002B/\u0022;\r\n\r\n// Use a lookup table to find the index.\r\nvar lookup = new Uint8Array(256);\r\nfor (var i = 0; i \u003C chars.length; i\u002B\u002B) {\r\n lookup[chars.charCodeAt(i)] = i;\r\n}\r\n\r\nfunction decode(base64) {\r\n var bufferLength = base64.length * 0.75,\r\n len = base64.length, i, p = 0,\r\n encoded1, encoded2, encoded3, encoded4;\r\n\r\n if (base64[base64.length - 1] === \u0022=\u0022) {\r\n bufferLength--;\r\n if (base64[base64.length - 2] === \u0022=\u0022) {\r\n bufferLength--;\r\n }\r\n }\r\n\r\n var arraybuffer = new ArrayBuffer(bufferLength),\r\n bytes = new Uint8Array(arraybuffer);\r\n\r\n for (i = 0; i \u003C len; i\u002B=4) {\r\n encoded1 = lookup[base64.charCodeAt(i)];\r\n encoded2 = lookup[base64.charCodeAt(i\u002B1)];\r\n encoded3 = lookup[base64.charCodeAt(i\u002B2)];\r\n encoded4 = lookup[base64.charCodeAt(i\u002B3)];\r\n\r\n bytes[p\u002B\u002B] = (encoded1 \u003C\u003C 2) | (encoded2 \u003E\u003E 4);\r\n bytes[p\u002B\u002B] = ((encoded2 \u0026 15) \u003C\u003C 4) | (encoded3 \u003E\u003E 2);\r\n bytes[p\u002B\u002B] = ((encoded3 \u0026 3) \u003C\u003C 6) | (encoded4 \u0026 63);\r\n }\r\n\r\n return arraybuffer;\r\n };\r\n\r\nfunction _base64ToArrayBuffer(base64) {\r\n var binary_string = window.atob(base64);\r\n var len = binary_string.length;\r\n var bytes = new Uint8Array( len );\r\n for (var i = 0; i \u003C len; i\u002B\u002B) {\r\n bytes[i] = binary_string.charCodeAt(i);\r\n }\r\n return bytes.buffer;\r\n}","TestCases":[{"Name":"Cached decode","Code":"decode(str);","IsDeferred":false},{"Name":"Simple decode","Code":"_base64ToArrayBuffer(str);","IsDeferred":false}]}