123456789101112131415161718192021222324 |
- <?php
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- /**
- * Description of GZip
- *
- * @author jgao
- */
- class GZip {
- //put your code here
-
- static function encode($data){
- return gzencode($data);
- }
-
- static function decode($data){
- return gzinflate(substr($data,10,-8)); // 高版本的php已经拥有名为【gzdecode】的api
- }
- }
|