public function prepareGzip() { $input = JFactory::getApplication()->input; $key = $input->get('key', '', 'cmd'); $options = array('key' => $key); try { $backup = new RSFormProBackup($options); $archive = new RSFormProTar($backup->getPath()); // Need to make the archive valid now that we're done with it. $archive->addFooter(); // Continue with GZIP archive creation $this->showResponse(array('status' => 'ok', 'step' => 'prepare-gzip', 'chunks' => ceil($archive->getSize() / $archive->getChunkSize()))); } catch (Exception $e) { $this->showError($e->getMessage()); } }