private function _uncompress($content, $mode, $uncompressed_size, $target_file_name = false)
{
switch ($mode) {
case 0:
return $target_file_name ? file_put_contents($target_file_name, $content) : $content;
case 1:
$this->set_error('Shrunk mode is not supported... yet?');
return false;
case 2:
case 3:
case 4:
case 5:
$this->set_error('Compression factor ' . ($mode - 1) . ' is not supported... yet?');
return false;
case 6:
$this->set_error('Implode is not supported... yet?');
return false;
case 7:
$this->set_error('Tokenizing compression algorithm is not supported... yet?');
return false;
case 8:
// Deflate
return $target_file_name ? file_put_contents($target_file_name, gzinflate($content, $uncompressed_size)) : gzinflate($content, $uncompressed_size);
case 9:
$this->set_error('Enhanced Deflating is not supported... yet?');
return false;
case 10:
$this->set_error('PKWARE Date Compression Library Impoloding is not supported... yet?');
return false;
case 12:
// Bzip2
return $target_file_name ? file_put_contents($target_file_name, bzdecompress($content)) : bzdecompress($content);
case 18:
$this->set_error('IBM TERSE is not supported... yet?');
return false;
default:
$this->set_error('Unknown uncompress method: $mode');
return false;
}
}