18 #include <Compression.h>
30 : m_level(
ROOT::CompressionSettings(
ROOT::RCompressionSetting::EAlgorithm::kZLIB, 1 ) ) {
31 const std::string::size_type idx = settings.find(
':' );
32 if ( idx != std::string::npos ) {
34 const std::string
alg = settings.substr( 0, idx );
35 ROOT::RCompressionSetting::EAlgorithm::EValues alg_code = ROOT::RCompressionSetting::EAlgorithm::kUseGlobal;
36 if (
alg ==
"ZLIB" ) {
37 alg_code = ROOT::RCompressionSetting::EAlgorithm::kZLIB;
38 }
else if (
alg ==
"LZMA" ) {
39 alg_code = ROOT::RCompressionSetting::EAlgorithm::kLZMA;
40 }
else if (
alg ==
"LZ4" ) {
41 alg_code = ROOT::RCompressionSetting::EAlgorithm::kLZ4;
42 #if ROOT_VERSION_CODE >= ROOT_VERSION( 6, 20, 0 )
43 }
else if (
alg ==
"ZSTD" ) {
44 alg_code = ROOT::RCompressionSetting::EAlgorithm::kZSTD;
47 throw std::runtime_error(
"ERROR: Unknown ROOT compression algorithm:" +
alg );
51 const std::string slev = settings.substr( idx + 1 );
52 const int ilev = std::stoi( slev );
55 m_level = ROOT::CompressionSettings( alg_code, ilev );