I\'d like to read a binary file with a few 32 bit float values at byte offset 31.
Unfortunately, new Float32Array(buffer, 31, 6); does not work. An offs
new Float32Array(buffer, 31, 6);
You can use slice to get a new ArrayBuffer whose contents are a copy of this ArrayBuffer's bytes from begin, inclusive, up to end
slice
const buffer = new ArrayBuffer(250); const list = buffer.slice(10); // index [11,250] const nums = new Int32Array(list, 0, 60);