I have a 1GB file that I would like to load into a javascript buffer and then read the first line of it. I wasn't sure what the correct 'type' to use for this would be. For example, here is the pseudocode I have:
file = new FileBuffer('/user/me/Desktop/file.csv')
first_line = file.getline(0)
What would actually be the proper way to do this in javascript (ArrayBuffer
or SharedArrayBuffer
or TypedArrayBuffer
?), and what is the suggested 'buffer-type' to use for a utf-8 file with a known size?