v2
11/3/2022 by demonthos -00
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
let utf8decoder = new TextDecoder();
let u8arr = new Uint8Array([0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C, 0x68, 0x65, 0x6C, 0x6C]);
new Uint32Array(u8arr.buffer);
let view = new DataView(u8arr.buffer);

function read(start, _end) {
    let pos = start;
    let sum = 0;
    while (pos < _end) {
      sum += view.getUint8(pos++);
    }
  }
  
function read2(start, _end) {
    let pos = start;
    let char, i, sum=0;
    while (pos < _end) {
      char = view.getUint32(pos);
      sum += char & 0xFF;
      sum += (char >>>= 8) & 0xFF;
      sum += (char >>>= 8) & 0xFF;
      sum += (char >>>= 8) & 0xFF;
//      byte1 = char >> 24, byte2 = (char & 0x00FF0000) >> 16, byte3 = (char & 0x0000FF00) >> 8, byte4 = (char & 0x000000FF);
      pos += 4;
    }
  }
delete caserun single casemove downdrag and drop case


ready



read2(0, u8arr.length);
delete caserun single casemove updrag and drop case


ready



read(0, u8arr.length);
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN