ROOT RC Compression default

ROOT Version: 6.14.00
Platform: Any
Compiler: Any

The current ROOT RC in 6.14.00 has Root.ZipMode still set to 1, but in core/zip/src/RZip.cxx, it looks like 4 is supposed to set the default to LZ4, and 1 is the old ZLIB - so it must be currently ignored. It would be very nice to have a way to change the default through an RC file, since for people working with local ROOT installs (6.14) that are trying to also read their code on a server (LxPlus with a bunch of libraries compiled with ROOT 6.06, in this case), there is no way to quickly add a ROOT RC file to fix the saved files.

It would also be a good idea to update the text in config/ to mention if it is no longer used, or in what cases it’s used.

Also, there does not seem to be a global setting at all; the SetCompressionAlgorithm call or constructor change would have to be injected into every TFile.

Hi @henryiii !

Thank you so much for your remark! I will submit a fix as soon as possible!
You are right, since we don’t have a possibility to set a global settings, we need always to look for "magic compression algorithm’s numbers "(both, compression algorithm and compression level encodings) and some of them are not easily to find :slight_smile:
I have a plan to change it and to make it more consistence through all ROOT.


Thanks for the report! This is now

I couldn’t keep the old Root.ZipMode alive as its meaning is changed so drastically that there is no forward compatibility: the old default was 1, so if people copied an old system.rootrc into ~/ then they would be writing zlib compressed files from here on - while in reality they did not touch that setting, and would reasonably expect to get the default behavior.

The new Root.CompressionAlgorithm fixes that ambiguity by introducing 0 as “default” and allowing to set it to 1 to get zlib. I hope that addresses your concern.

Thanks for finding and reporting this bug - this is crucial for 6.14, and we will backport it there before the release of 6.14/02!

Cheers, Axel.

1 Like

Thanks! This looks like the right solution. CompressionAlgorithm is also a much better name than ZipMode, IMO.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.