protected function CompressionFilter::_bzipDecode in Backup and Migrate 8.4
BZip decode a file.
Parameters
\BackupMigrate\Core\File\BackupFileReadableInterface $from:
\BackupMigrate\Core\File\BackupFileWritableInterface $to:
Return value
bool
1 call to CompressionFilter::_bzipDecode()
- CompressionFilter::beforeRestore in lib/
backup_migrate_core/ src/ Filter/ CompressionFilter.php - Run on a restore.
File
- lib/
backup_migrate_core/ src/ Filter/ CompressionFilter.php, line 281
Class
- CompressionFilter
- Class CompressionFilter.
Namespace
BackupMigrate\Core\FilterCode
protected function _bzipDecode(BackupFileReadableInterface $from, BackupFileWritableInterface $to) {
$success = FALSE;
if (!$success && function_exists("bzopen")) {
if ($fp_in = bzopen($from
->realpath(), 'r')) {
while (!feof($fp_in)) {
$to
->write(bzread($fp_in, 1024 * 512));
}
$success = TRUE;
bzclose($fp_in);
$to
->close();
}
}
return $success;
}