Home

Add a comment

 

Avatar: pieroxy

demo page over reports the uncompressed size

Not quite. In order to add data to a query string, you have to process it through encodeURIComponent. In your case, assuming your data is in a string called data you should compare the length of encodeURIComponent(data) and the length of LZString.compressToEncodedURIComponent(data). Each version will take one byte to be sent to the server. If you have lots of characters that are not uri-safe in your original string (some json for example) there could be a sizeable gain.

demo page over reports the uncompressed size


Title
Body
HTML : b, strong, i, em, blockquote, br, p, pre, a href="", ul, ol, li, sub, sup
OpenID Login
Name
E-mail address
Website
Remember me Yes  No 

E-mail addresses are not publicly displayed, so please only leave your e-mail address if you would like to be notified when new comments are added to this blog entry (you can opt-out later).

Home