You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Do you know the length?

    What you're doing is fine, but I'd be tempted to just read the whole thing (or at least big chunks) into memory and use views to read it directly:

    var f = E.openFile("myTestF.idx","r");
    var bytes = E.toUint8Array(f.read(16));
    var floats = new Float32Array(bytes.b­uffer);
    f.close();
    

    By using .buffer you're not actually allocating any more memory - the two arrays are sharing the same data.

About

Avatar for Gordon @Gordon started