title: Best way to encode/decode large quantities of data for a JavaScript client?
body: <p>I'm writing a standalone javascript application with Spine, Node.js, etc.(<a href="http://numerology.pinedesk.biz/" rel="nofollow">Here is an earlier incarnation</a> of it if you are interested). Basically, the application is an interactive 'number property' explorer. The idea being that you can select any number, and see what properties it possesses. Is it a prime, or triangular, etc? Where are other numbers that share the same properties? That kind of thing.</p>
  
  <p>At the moment I can pretty easily show like numbers 1-10k, but I would like to show properties for numbers 1-million, or even better 1-billion.</p>
  
  <p>I want my client to download a set of static data files, and then use them to present the information to the user. I don't want to write a server backend.</p>
  
  <p>Currently I'm using JSON for the data files. For some data, I know a simple algorithm to derive the information I'm looking for on the client side, and I use that (ie, is it even?). For the harder numbers, I pre compute them, and then store the values in JSON parseable data files. I've kinda gone a little overboard with the whole thing - <a href="https://github.com/dsummersl/bloomfilters" rel="nofollow">I implemented</a> a pure javascript <a href="http://en.wikipedia.org/wiki/Bloom_filter" rel="nofollow">bloom filter</a> and when that didn't scale to 1 million for primes, I tried using <a href="http://ricerca.mat.uniroma3.it/users/colanton/concise.html" rel="nofollow">CONCISE bitmaps</a> underneath (which didn't help). Eventually I realized that it doesn't matter too much how 'compressed' I get my data, if I'm representing it as JSON.</p>
  
  <p>So the question is - I want to display 30 properties for each number, and I want to show a million numbers...thats like 30 million data points. I want the javascript app to download this data and present it to the user, but I don't want the user to have to download megabytes of information to use the app...</p>
  
  <p>What options do I have for efficiently sending these large sets of data to my javascript only solution?</p>
  
  <p>Can I convert to binary and then read binary on the client side? Examples, please!</p>