name | correct guesses | games together | ratio |
---|
name | correct guesses | games together | ratio |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | function compress(sus) { let sussy = []; let baka = null; for(let i=0; i<sus.length; i++) { if(sus[i] === baka && sussy[sussy.length-1] < 255) { sussy[sussy.length-1]++; } else { sussy.push(sus[i]); sussy.push(0); baka = sus[i]; } } return Uint8Array.from(sussy); } function decompress(sus) { let sussy = []; for(let i=0; i<sus.length; i+=2) { sussy = [...sussy, ...Array(sus[i+1]+1).fill(sus[i])]; } return Uint8Array.from(sussy); } |
post a comment