ZLIB in ROOT

Hello,

I have to read some text files using zlib decompression. I have noticed that ROOT is implementing a Compression class. It seems to be very related to ROOT files decompression.

Is there a way to take advantage of this already existing dependencies in root ?

what about: GitHub - mateidavid/zstr: A C++ header-only ZLib wrapper

Hi @ferhue,

Thank you ! Yes I have implemented it, but I wanted to be sure this was not already done in ROOT directly without handling additional deps in my C++ compilation

Is that so ?

Maybe @linev or @pcanal know if there is something of the sort directly withiin ROOT.

Hi,

ROOT internally uses several compression algorithms.
But there is no documentation or tutorials for that.

There are only low-level functions which can be in RZip.h include file:

One usually compress data using R__zipMultipleAlgorithm function and decompress with R__unzip.
You could try to find examples in ROOT source code. Like in TMessage class:

Be aware of kMAXZIPBUF constant which defines maximal buffer size for compression.

Regards,
Sergey

1 Like

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