-
• #2
It depends on the size of the array I guess, and whether you want it human readable or not.
Text
// write fs.writeFileSync("foo.txt", array.toString()); // read array = new Float32Array(JSON.parse(fs.readFileSync("foo.txt")));
Binary
// write fs.writeFileSync("foo.bin", E.toString(array.buffer)); // read array = new Float32Array(E.toArrayBuffer(fs.readFileSync("foo.txt")));
For bigger arrays binary would be better, and for very big arrays you'd be looking at multiple save calls.
-
• #3
Wow, can't even write my questions as fast as your feedback is comin.
Thanks a lot.
I would like to write an array fo Float32Array to sd and read it back later.
What is the best way to do this ?