PHP compressed strings, JavaScript decompressed things

Source: Internet
Author: User
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

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.