I've got some strings that I need to compress server-side in C#, then decompress client-side in JavaScript. What can I use to accomplish this?
1 Answer
Assuming you're fetching this data over HTTP, is there any reason you can't do this at the HTTP level? (See this article for information about HTTP compression.)
That way you shouldn't need to do anything on the client side, apart from making sure that the request includes the appropriate Accept-Encoding header. Depending on your server, you may be able to just tweak some server settings to get the compression automatically on that side too...
To be honest, it's worth breaking out WireShark to check exactly what's going up and down the wire already. It's just possible you've already got compression without knowing it :)