Skip to content

Commit 01aeb02

Browse files
committed
[cmake] Remove compression_default option
In theory, it provides the means to change the default compression algorithm. This used to work when TFile defaulted to compress=1, only specifying the compression level, but commit e9c4b2e in 2018 changed the default to 101, including the compression algorithm. Moreover, lzma wasn't implemented so the option didn't live up to its documentation.
1 parent b3a5e30 commit 01aeb02

5 files changed

Lines changed: 4 additions & 28 deletions

File tree

README/ReleaseNotes/v640/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ The following people have contributed to this new version:
6969
multiGraph->Add(static_cast<TGraph*>(gr->Clone()));
7070
}
7171
```
72+
* The `compression_default` build option was removed. It was supposed to change the default compression algorithm, but didn't actually work with the default parameters of `TFile`.
7273
7374
## Build System
7475

cmake/modules/RootBuildOptions.cmake

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -202,16 +202,6 @@ if(all AND minimal)
202202
message(FATAL_ERROR "The 'all' and 'minimal' options are mutually exclusive")
203203
endif()
204204

205-
#--- Compression algorithms in ROOT-------------------------------------------------------------
206-
set(compression_default "zlib" CACHE STRING "Default compression algorithm (zlib (default), lz4, zstd or lzma)")
207-
string(TOLOWER "${compression_default}" compression_default)
208-
if("${compression_default}" MATCHES "zlib|lz4|lzma|zstd")
209-
message(STATUS "ROOT default compression algorithm: ${compression_default}")
210-
else()
211-
message(FATAL_ERROR "Unsupported compression algorithm: ${compression_default}\n"
212-
"Known values are zlib, lzma, lz4, zstd (case-insensitive).")
213-
endif()
214-
215205
#--- The 'all' option switches ON major options---------------------------------------------------
216206
if(all)
217207
set(arrow_defvalue ON)
@@ -381,8 +371,9 @@ endif()
381371

382372
#---Removed options------------------------------------------------------------
383373
# Please notify SPI when adding to this list
384-
foreach(opt afdsmgrd afs alien bonjour builtin_afterimage builtin_davix castor chirp cxx11 cxx14 cxx17
385-
cxxmodules exceptions geocad gfal glite globus gsl_shared hdfs html ios jemalloc krb5
374+
foreach(opt afdsmgrd afs alien bonjour builtin_afterimage builtin_davix castor chirp
375+
compression_default cxx11 cxx14 cxx17 cxxmodules exceptions
376+
geocad gfal glite globus gsl_shared hdfs html ios jemalloc krb5
386377
ldap memstat minuit2 monalisa oracle proof pyroot-python2 pyroot_legacy
387378
pythia6 pythia6_nolink python qt qtgsi qt5web rfio ruby sapdb srp table
388379
tcmalloc vmc xproofd mysql odbc pgsql)

cmake/modules/RootConfiguration.cmake

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,6 @@ else()
396396
set(hasroot7 undef)
397397
endif()
398398

399-
set(uselz4 undef)
400-
set(usezlib undef)
401-
set(uselzma undef)
402-
set(usezstd undef)
403-
set(use${compression_default} define)
404-
405399
if(ZLIB_NG)
406400
set(usezlibng define)
407401
else()

config/RConfigure.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@
5353
#@use_less_includes@ R__LESS_INCLUDES /**/
5454
#define R__HARDWARE_INTERFERENCE_SIZE @hardwareinterferencesize@ /*Determined at CMake configure to be stable across all TUs*/
5555

56-
#@uselz4@ R__HAS_DEFAULT_LZ4 /**/
57-
#@usezlib@ R__HAS_DEFAULT_ZLIB /**/
58-
#@uselzma@ R__HAS_DEFAULT_LZMA /**/
59-
#@usezstd@ R__HAS_DEFAULT_ZSTD /**/
6056
#@usezlibng@ R__HAS_ZLIB_NG /**/
6157

6258
#@hastmvacpu@ R__HAS_TMVACPU /**/

core/zip/src/RZip.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,7 @@ static void R__unzipZLIB(int *srcsize, const unsigned char *src, int *tgtsize, u
4848
is done. LZ4 typically has the worst compression ratios, but much faster decompression
4949
speeds - sometimes by an order of magnitude.
5050
*/
51-
#ifdef R__HAS_DEFAULT_ZSTD
52-
ROOT::RCompressionSetting::EAlgorithm::EValues R__ZipMode = ROOT::RCompressionSetting::EAlgorithm::EValues::kZSTD;
53-
#elif defined(R__HAS_DEFAULT_LZ4)
54-
ROOT::RCompressionSetting::EAlgorithm::EValues R__ZipMode = ROOT::RCompressionSetting::EAlgorithm::EValues::kLZ4;
55-
#else
5651
ROOT::RCompressionSetting::EAlgorithm::EValues R__ZipMode = ROOT::RCompressionSetting::EAlgorithm::EValues::kZLIB;
57-
#endif
5852

5953
/* ===========================================================================
6054
Function to set the ZipMode

0 commit comments

Comments
 (0)