private static function openZipFile(string $zip_file, int $flags = null): ZipArchive {

        $zip = new ZipArchive();

        $open = $zip->open($zip_file, $flags);
        if ( $open !== true ) {
            throw new ZipException(StatusCodes::get($open));
        }

        return $zip;

    }