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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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