-
• #2
By truncating you mean producing an 8 bit number - turning 5000 into 136, rather than 19 and 136?
I think so -
E.toX
takes whatever you give it, and should produce something with the same number of elements. I think if you did:a = new Uint16Array(4); a[1] = 4; b = E.toUint8Array(a); console.log(b[1]);
You'd expect to get
4
returned.As you found, if you want to get at the untruncated byte data of a UintXArray, you can just access
array.buffer
Are those ones that truncate the values instead of splitting them up supposed to behave that way?