Requirements Title:
An extra-long string is compressed by PHP, gets the compressed string, and then decompressed by the browser's JavaScript to get the original string.
There are no such tools such as plugins, or algorithms, functions, methods, classes, etc.
Reply content:
Requirements Title:
An extra-long string is compressed by PHP, gets the compressed string, and then decompressed by the browser's JavaScript to get the original string.
There are no such tools such as plugins, or algorithms, functions, methods, classes, etc.
Why not directly with PHP output, but also JS decoding? If you really need to look at Php urldecode,urlencode, combined with JS Encodeuricomponent,encodeuri this kind of method do not know whether it is feasible, I have not tried.
It seems that only files can be processed and strings cannot be processed ...
You look at this.
Https://gildas-lormeau.github.io/zip.js/demos/demo2.html
Gzip is a mature compression algorithm, the PHP extension also comes with. However, the page itself can be compressed by gzip, there is no need to compress the string inside again.
http://blog.csdn.net/wuzhekai1985/article/details/6626228