20 if (compressionLevel < 0) compressionLevel = 0;
21 if (compressionLevel > 99) compressionLevel = 99;
24 return algo * 100 + compressionLevel;
35 default:
return "Undefined compression algorithm";
Small utility to parse cmdline options.
int CompressionSettings(RCompressionSetting::EAlgorithm::EValues algorithm, int compressionLevel)
EValues
Note: this is only temporarily a struct and will become a enum class hence the name convention used.
@ kLZ4
Use LZ4 compression.
@ kOldCompressionAlgo
Use the old compression algorithm.
@ kZSTD
Use ZSTD compression.
@ kUndefined
Undefined compression algorithm (must be kept the last of the list in case a new algorithm is added).
@ kZLIB
Use ZLIB compression.
@ kLZMA
Use LZMA compression.
static std::string AlgorithmToString(EAlgorithm::EValues algorithm)