Using nsIZipWriter or other to compress a string as a string?
- by Daniel
I need to be able to take a javascript string, compress it using any fast and available means and get back a binary string/blob.
Background:
The extension I'm developing needs to send various large content to my server.
It does this conveniently by dynamically creating a form, adding fields to the form and posting it. Some of these fields are just too big bandwidth wise for multiple use. I'd like to be able to compress them before adding them and then maybe base64'ing them if the characters cause a problem in the message. Any ideas?
I could use nsiZipWriter with temporary files on disk but that is quite ugly and probably sluggish.