Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#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 |
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
AccessPattern zipfile::ZipFileOptions::access_pattern = AccessPattern::ACCESS_NONE |
std::optional<size_t> zipfile::ZipFileOptions::zip_bomb_max_ratio = std::nullopt |
std::optional<size_t> zipfile::ZipFileOptions::zip_bomb_max_size = std::nullopt |