Closed efronbs closed 7 years ago
This should be low priority. If you are transferring the profile archive via HTTP (using XMLHttpRequest), the browser will gzip compress it for you during transmission -- pretty much automatically.
http://stackoverflow.com/questions/17130387/compressing-a-blob-in-javascript
Information on compressing data in JS. In short, there is no clean, clear, built in way to do it.
It is also hard to tell how important this is. I would probably need to compress on the server, and decompress on the client but that is all. I don't think I will be return THAT much data to the server that compression client side would be worth it
Similarly, while I definitely would need to send over a lot of data initially (namely cookies), I don't need to send over an entire profile and could just request profile data once the user visits a new site. I am almost guaranteed to do this anyways, because profiles can get pretty huge. Persistent storage alone can be up to 60GiB, and no compression algorithm will get that down to a size I would like to transfer every time the user opens her browser.
Closing for now, if I get to a point where compression becomes necessary I will reopen this.
Currently I am using a plaintext JSON string to store profiles. This is alright with just cookies, but once I add the far more extensive local storage data, storing and loading that much data will probably be far too slow. I need to compress the profiles when I store them, and decompress stored profiles when I load them