protected function get_packer_for_read_operation($archivefile) {
        global $CFG;
        require_once($CFG->dirroot . '/lib/filestorage/tgz_packer.php');

        if (tgz_packer::is_tgz_file($archivefile)) {
            return get_file_packer('application/x-gzip');
        } else {
            return get_file_packer('application/zip');
        }
    }