{"ScriptPreparationCode":"var command = Math.floor(Math.random() * 65536),\r\n operation = Math.floor(Math.random() * 65536),\r\n cellId = Math.floor(Math.random() * 60),\r\n buffer = new Uint8Array(Array.from({\r\n length: Math.floor(Math.random() * 100)\r\n }).map(() =\u003E Math.floor(Math.random() * 256))).buffer,\r\n reverse = [0, 3],\r\n HEADER_SIZE = 8,\r\n MSG_HEADER_LEN = 32;","TestCases":[{"Name":"set","Code":"const dataLength = buffer.byteLength;\r\nconst content = new ArrayBuffer(MSG_HEADER_LEN \u002B dataLength);\r\n\r\nconst contentView = new Uint32Array(content, 0, HEADER_SIZE);\r\n\r\nif (dataLength) {\r\n const srcBuffer = new Uint8Array(buffer);\r\n const dstBuffer = new Uint8Array(content);\r\n dstBuffer.set(srcBuffer, MSG_HEADER_LEN);\r\n}","IsDeferred":false},{"Name":"copy","Code":"const dataLength = buffer.byteLength;\r\nconst content = new ArrayBuffer(MSG_HEADER_LEN \u002B dataLength);\r\n\r\nconst contentView = new Uint32Array(content, 0, HEADER_SIZE);\r\n\r\nif (dataLength) {\r\n const srcBuffer = new Uint8Array(buffer);\r\n const dstBuffer = new Uint8Array(content, MSG_HEADER_LEN, dataLength);\r\n for (let index = 0; index \u003C dataLength; index\u002B\u002B) {\r\n dstBuffer[index] = srcBuffer[index];\r\n }\r\n}","IsDeferred":false}]}