Skip to content
Snippets Groups Projects
user avatar
Rene Brun authored
dynamically the new zlib as an alternative to the current zip functions.


To activate the new zlib it is enough to set Root.ZipMode = 1
in the system.rootrc file.
When setting Root.ZipMode to 1 (or 0) it is possible to read files
written with the old zip function.
Files written with Root.ZipMode=1 can only be read by versions
of Root >= 4.02/00.

A new function R__SetZipMode has been added in zip/Bits.h.
This function is called by TROOT::InitSystem with the value specified
in system.rootrc.

Some performance tests (on a P4 2.4GHz) show that
the new zlib version is as fast as the current ROOT zip functions when
writing and up to 10 per cent faster when reading.
                          oldzlib            newzlib
Event 1000 1 0   1         11.59s             11.46s
Event 1000 1 0  20          3.83s              3.31s
Event 1000 1 99  1         10.44s             10.98s
Event 1000 1 99 20          3.57s              3.17s
stress -b 30               13.01s             12.35s
stress -b 1000             61.67s             58.38s
bench                     151.99s            151.56s
stressLinear               35.87s             35.77s


git-svn-id: http://root.cern.ch/svn/root/trunk@10737 27541ba8-7e3a-0410-8455-c3a389f83636
e65fe033
History
Name Last commit Last update
..
inc
src
Module.mk
README
The compression package "zlib" is part of the zip directory. The original tar 
file can be downloaded from : http://www.zlib.org 

Only the useful code has been extracted from this tar file. It consists of: 

 zip/inc:
   crc32.h deflate.h inffast.h inffixed.h inflate.h
   inftrees.h trees.h zconf.h zlib.h zutil.h

 zip/src:
   adler32.c compress.c crc32.c deflate.c gzio.c infback.c
   inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c

To put a new zlib version in ROOT, all these files must be replaced.

The zlib version number can be found in zip/inc/zlib.h

zlib is now used in TPDF to compress the "stream" part of PDF files.

The ROOT compress functions R__zip and R__unzip have also been modified
in order to use zlib. Some performance tests (on a P4 2.4GHz) show that 
the new zlib version is as fast as the current ROOT zip functions when
writing and up to 10 per cent faster when reading.
                          oldzlib            newzlib
Event 1000 1 0   1         11.59s             11.46s
Event 1000 1 0  20          3.83s              3.31s
Event 1000 1 99  1         10.44s             10.98s
Event 1000 1 99 20          3.57s              3.17s
stress -b 30               13.01s             12.35s
stress -b 1000             61.67s             58.38s
bench                     151.99s            151.56s
stressLinear               35.87s             35.77s

To activate the new zlib it is enough to set Root.ZipMode = 1
in the system.rootrc file.
When setting Root.ZipMode to 1 (or 0) it is possible to read files
written with the old zip function.
Files written with Root.ZipMode=1 can only be read by versions
of Root >= 4.02/00