Uncompress gzcompress string in JavaScipt (jQuery)-Collection of common programming errors

I have a html5 based mobile application, where I send data from the server (PHP) in textual format.

The problem is that my Data is pretty big, around 18Mo but when compressed using gzcompress it became a lot smaller.

My Problem is how uncompress the string back in JavaScript I used the plugin JXG and its working very well in both browser and simulator but the app crashes when running in my iPad 2, does any one know a better way ?