Possible Duplicate:
JavaScript implementation of Gzip
I'm looking for a text (string) compression method that works in JavaScript and PHP, similarly to how it works in JSON. I do not know if there is a similar technology.
For example, I would like to compress text with JavaScript and then decompress it afterwards with PHP in another page.
I apologize in advance if this post seems to be a duplicate, but I have searched and have not found anything similar to what I need. I only found functions that work exclusively in one technology (PHP or JavaScript, not in both. one example:
<script>
var text=aaaaa;
text=functionForCompress(text){}
text-> for example 5a
<script>
in a page php:
$decompresedText=functionForDeCompress(request->data);
$decompresedText -> aaaaa
request->data contains variable text of script