Файл: important/important_gzip.php
Строк: 38
<?php 
error_reporting(0); 
class bishopgzip{ 
public static function info(){ 
switch(zlib_get_coding_type()){ 
default: 
$in = $out = round(ob_get_length() / 1024, 2); 
$compress = 0; 
return 'Сжатие: '.$compress.' % | Метод: compression not supported |'; 
break; 
case 'gzip': 
$level = ini_get('zlib.output_compression_level'); 
$in = round(ob_get_length() / 1024, 2); 
$out = round(strlen(gzencode(ob_get_contents(), $level, FORCE_GZIP)) / 1024, 2); 
$compress = round(100 - (100 / ($in / $out)), 1); 
return '[Сжатие: '.$compress.' % | Метод: Gzip | '; 
break; 
case 'deflate': 
$level = ini_get('zlib.output_compression_level'); 
$in = round(ob_get_length() / 1024, 2); 
$out = round(strlen(gzencode(ob_get_contents(), $level, FORCE_DEFLATE)) / 1024, 2); 
$compress = round(100 - (100 / ($in / $out)), 1); 
return 'Сжатие: '.$compress.' % | Метод: Deflate | '; 
break; 
}
} 
} 
?>