I have the following TypedArray (note that the size of this data is 80 bits):
var arr = new Uint8Array([10, 110, 206, 117, 200, 35, 99, 2, 98, 125]);
and I want to rotate it by N bits (where N is any integer from 0 to 79). For example, if N=50, I will represent it like this:
00001010 01101110 11001110 01110101 11001000 00100011 01100011 00000010 01100010 01111101
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
so the result should be
01101100 01100000 01001100 01001111 10100001 01001101 11011001 11001110 10111001 00000100
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
so arr[0]
will be equal to 108, arr[1]
will be equal to 96 etc. How to solve this?