{"ScriptPreparationCode":"function bytesToBase64ByBtoa(bytes) {\r\n return btoa(bytes.reduce((data, byte) =\u003E data \u002B String.fromCharCode(byte), \u0022\u0022));\r\n}\r\n\r\nfunction bytesToBase64ByBtoaSpread(bytes) {\r\n return btoa(String.fromCharCode(...bytes));\r\n}\r\n\r\nconst bytes1K = new Uint8Array(1024);\r\nconst bytes32K = new Uint8Array(32768);\r\nconst bytes64K = new Uint8Array(65536);\r\nconst bytes1M = new Uint8Array(1048576);\r\nfor (const bytes of [bytes1K, bytes32K, bytes64K, bytes1M])\r\n for (let i = 0; i \u003C bytes.length; i \u002B= 65536)\r\n crypto.getRandomValues(bytes.subarray(i, i \u002B 65536));","TestCases":[{"Name":"btoa 1K","Code":"bytesToBase64ByBtoa(bytes1K);","IsDeferred":false},{"Name":"btoa 32K","Code":"bytesToBase64ByBtoa(bytes32K);","IsDeferred":false},{"Name":"btoa 64K","Code":"bytesToBase64ByBtoa(bytes64K);","IsDeferred":false},{"Name":"btoa 1M","Code":"bytesToBase64ByBtoa(bytes1M);","IsDeferred":false},{"Name":"btoa spread 1K","Code":"bytesToBase64ByBtoaSpread(bytes1K);","IsDeferred":false},{"Name":"btoa spread 32K","Code":"bytesToBase64ByBtoaSpread(bytes32K);","IsDeferred":false},{"Name":"btoa spread 64K","Code":"bytesToBase64ByBtoaSpread(bytes64K);","IsDeferred":false}]}