Requirement: PHP compresses a super-long string to obtain the compressed string, and then decompress the string using the javascript code of the browser to obtain the original string. is there any such plug-in, or algorithm, function, method, class, or other tool requirements such:
PHP compresses a super-long string to obtain the compressed string. Then, the javascript in the browser decompress the string to obtain the original string.
Is there such a plug-in, or an algorithm, function, method, class, or other tool?
Reply content:
Requirements:
PHP compresses a super-long string to obtain the compressed string. Then, the javascript in the browser decompress the string to obtain the original string.
Is there such a plug-in, or an algorithm, function, method, class, or other tool?
Why don't I directly use PHP for output, but I need to use js for decoding? If you really need to take a look at the PHP urldecode and urlencode, combined with the js encodeURIComponent, encodeURI and other methods are not feasible, I have not tried.
It seems that only files can be processed, and strings cannot be processed...
Look at this.
Https://gildas-lormeau.github.io/zip.js/demos/demo2.html
Gzip and so on are mature compression algorithms, which are also included in PHP extensions. However, the web page itself can be compressed through Gzip, so there is no need to compress the strings in it again.
Http://blog.csdn.net/wuzhekai1985/article/details/6626228