/** * Extend the bootstrap code to add some define's used by the JPA format engine * * @codeCoverageIgnore * * @return void */ protected function __bootstrap_code() { if (!defined('_AKEEBA_COMPRESSION_THRESHOLD')) { $config = Factory::getConfiguration(); define("_AKEEBA_COMPRESSION_THRESHOLD", $config->get('engine.archiver.common.big_file_threshold')); // Don't compress files over this size /** * Akeeba Backup and JPA Format version change chart: * Akeeba Backup 3.0: JPA Format 1.1 is used * Akeeba Backup 3.1: JPA Format 1.2 with file modification timestamp is used */ define('_JPA_MAJOR', 1); // JPA Format major version number define('_JPA_MINOR', 2); // JPA Format minor version number } parent::__bootstrap_code(); }
/** * Get the preferred compression method for a file * * @param int $fileSize File size in bytes * @param int $memLimit Memory limit in bytes * @param bool $isDir Is it a directory? * @param bool $isSymlink Is it a symlink? * * @return int Compression method to use */ protected function getCompressionMethod($fileSize, $memLimit, $isDir, $isSymlink) { // ZIP uses 0 for uncompressed and 8 for GZip Deflate whereas the parent method returns 0 and 1 respectively return 8 * parent::getCompressionMethod($fileSize, $memLimit, $isDir, $isSymlink); }