Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
zipfile::ZipFileOptions Struct Reference

#include <zipfile.h>

Public Attributes

AccessPattern access_pattern = AccessPattern::ACCESS_NONE
 
std::optional< size_t > zip_bomb_max_ratio = std::nullopt
 
std::optional< size_t > zip_bomb_max_size = std::nullopt
 

Detailed Description

An options struct to be provided when opening a zip archive:

access_pattern, possible values: NORMAL: Will use a small InputBuffer to cache small files, raw access to big files. RANDOM: Do not do any caching at all. SEQUENTIAL: Always use a (big) InputBuffer to cache read access. SEQUENTIAL mode

zip_bomb_max_ratio, if greater than zero, indicates the maximum compression ratio to allow on any file in the zip archive. This can be used to reject files containing decompression bombs. A value of 0 disables zip bomb checking.

zip_bomb_max_size, if greater than zero, indicates the maximum decompressed file size that is allowed on any file in the zip archive. This is an additional layer of protection against zip bombs in addition to the zip_bomb_max_ratio

Definition at line 111 of file zipfile.h.

Member Data Documentation

◆ access_pattern

AccessPattern zipfile::ZipFileOptions::access_pattern = AccessPattern::ACCESS_NONE

Definition at line 112 of file zipfile.h.

◆ zip_bomb_max_ratio

std::optional<size_t> zipfile::ZipFileOptions::zip_bomb_max_ratio = std::nullopt

Definition at line 113 of file zipfile.h.

◆ zip_bomb_max_size

std::optional<size_t> zipfile::ZipFileOptions::zip_bomb_max_size = std::nullopt

Definition at line 114 of file zipfile.h.


The documentation for this struct was generated from the following file: