New compression algorithm

Dear root developers,
we are in the process of producing root files that exceed TB size,
the root version that will be used in the production 6.10/08
do you advice us to go ahead and use LZ4? and if yes
what is the exact command to switch to the new algorithm?
and is it backward compatible?

Cheers
Muhammad

@bockelman @oshadura @pcanal could one of you help here?

Hi @mhoroub -

A few things to think about:

  1. What’s the target use case for these files? LZ4’s target case is analysis: files that need to be read quickly but are not as sensitive to size as those that might go into a long-term archive.
  2. The different algorithms are, simplified:
  • LZMA: Very slow, but highest compression ratio.
  • LZ4: Very fast, but relatively poor compression ratio.
  • ZLIB: Middle-ground. Modest compression ratio, modest speed.
  1. You can set the default compression algorithm for a file at creation time: https://root.cern.ch/doc/v610/classTFile.html#a88a5f82fb73c97c1c27485ff475a93af. The compression algorithms are available here: https://github.com/root-project/root/blob/master/core/zip/inc/Compression.h#L34 .

If you’re interested in LZ4, try kLZ4 as the algorithm and 4 as the level.

Brian