1

I need to store some large binary files varying from about 5MB to about 1GB and random access them in my Google Chrome App.

But FileReader doesn't provide seek method so maybe I have to split a file into segments. Is there any other way to access large files without loading the whole file into memory?

And where should I store these files or segments? If there are many segments, will it cause performance problems?

  1. fileSystem
  2. localStorage
  3. indexDB
  4. webSQL
SEIAROTg
  • 636
  • 5
  • 8
  • localStorage isn't a bad idea since it's capacity is of *[at least 5MB](http://www.w3schools.com/html/html5_webstorage.asp)*, but I think it'll not support a 1GB file. – Tiago Marinho Jul 12 '14 at 05:24
  • Neither IndexDB nor WebSQL will be good options for binary data. Store the files in a FileSystem. The File object inherits from Blob which has a `slice()` method, so it should be possible to do some sort of random access with that. [This question](http://stackoverflow.com/questions/7594760/html5-file-api-slicing-or-not) might give you some pointers –  Jul 12 '14 at 05:30

0 Answers0