/** * BZip decode a file. * * @param \BackupMigrate\Core\File\BackupFileReadableInterface $from * @param \BackupMigrate\Core\File\BackupFileWritableInterface $to * @return bool */ 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; }
/** * {@inheritdoc} */ public function closeArchive() { $this->writeFooter(); $this->archive->close(); }