I'm pushing the limits of HTML5 here.
I have this problem: I have an javascript array of a billion doubles (or ints), anyways A LOT of numbers. I want to store this in the HTML5 localStorage.
You may say, hey, just use JSON.Stringify, BUT, JSON.Stringify produces a huge 200MB string. Because, a number (0.03910319 for example), is stored as a string (so each number is taking up some bytes instead of just a few bytes for the whole number).
I was thinking about base64 encoding the numbers in the array first, and then applying JSON.stringify?
Or is it for example better to JSON.Stringify and then GZip or use some compression function?
Come up with your creative ideas to encode/decode an javascript array of A BILLION ints/doubles in an efficient matter to a localStorage variable.
TensorFlowJS
I looked at TensorflowJS, my array is basically a 1-D Tensor. Tensorflow has some storage capabilities for models... Maybe that is a feasible solution.