Q:

Compressing string stored in session storage

I have a large string that is getting stored in session storage and at some point it gets sent to a server. The string gets quite large sometime (up wards of 2mb). Are there any compression algorithms I can use to reduce the size? 

A:

I was able to make this work by using DEFLATE javascript library at https://github.com/dankogai/js-deflate and compress the string on the client side and then decompress on the server side using the same algorithm. 
This function works really well in firefox and chrome but is very slow in IE. The compressed string is 15% the size of the original!
Look at this http://jsfiddle.net/mwolfetech/X2NL6 for an example

