1
我想知道是否有人提出了类似的东西?压缩和解压缩在PHP和JS
的方式来压缩文本:
<?php
$str = 'Hello world!';// the text here can be any characters long
$key = compress($str);// should return a key 32characters long/ or a fixed number of characters
$value = decompress($key);// should return "Hello World!"
?>
使用MD5是单向加密/压缩, 基本上我想类似MD5是可逆式。不必要的MD5它自己。
但请记住,如果可能的话,HTTP将在两端协商并压缩数据。 – symcbean 2010-01-29 17:20:56
我同意。如果可能,让类似php的ob_gzhandler或更好的mod \ _deflate处理透明的压缩。 – VolkerK 2010-01-29 17:47:29