function _backup_migrate_gzip_decode in Backup and Migrate 5.2
Gzip decode a file.
1 call to _backup_migrate_gzip_decode()
- backup_migrate_file_decompress in includes/
files.inc - Decompress a file with the given settings. Also updates settings to reflect new file mime and file extension.
File
- includes/
files.inc, line 251 - General file handling code for Backup and Migrate.
Code
function _backup_migrate_gzip_decode($source, $dest) {
$success = FALSE;
if (@function_exists("gzopen")) {
if (($fp_out = fopen($dest, 'wb')) && ($fp_in = gzopen($source, 'rb'))) {
while (!feof($fp_in)) {
fwrite($fp_out, gzread($fp_in, 1024 * 512));
}
$success = TRUE;
}
@gzclose($fp_in);
@fclose($fp_out);
}
return $success;
}