Created
November 29, 2012 18:35
-
-
Save marc1706/4170994 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!$data['uc_size']) | |
{ | |
$content = ''; | |
} | |
else | |
{ | |
$content = fread($this->fp, $data['c_size']); | |
} | |
$fp = fopen($target_filename, "w"); | |
switch ($data['c_method']) | |
{ | |
case 0: | |
// Not compressed | |
fwrite($fp, $content); | |
break; | |
case 8: | |
// Deflate | |
fwrite($fp, gzinflate($content, $data['uc_size'])); | |
break; | |
case 12: | |
// Bzip2 | |
fwrite($fp, bzdecompress($content)); | |
break; | |
} | |
fclose($fp); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment