You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I understood that if I don't define the file size in the beginning, then I can't use offset option, right?

    Correct, yes. However if you were to write the raw buffer from the Uint16Array I guess you know its size? 3 buffers of 2*SAMPLES bytes?

    But if you're planning on writing CSV maybe check out StorageFile - that provides a file that you can keep appending to (but it's text only, not binary): https://www.espruino.com/Reference#StorageFile

    The problem with writing CSV is you have to be able to load it back in - if you do str.split(",") that's going to create a huge array of numbers anyway, which is pretty much the same as using JSON.parse

About

Avatar for Gordon @Gordon started