I just converted an array of 8-bit numbers into an ArrayBuffer. Now I would like to convert it back to an array of 8-bit (1 byte) integers to double check they match. Wondering how to do that.
2 Answers
Dataview allows you to inspect the contents of an ArrayBuffer. Something like this would likely work:
let arr = [];
let view = new DataView(arrayBuffer);
for (let i = 0; i<view.byteLength;i++){
arr.push(view.getInt8(i))
}