hdf5/tools/h5dump
Pedro Vicente Nunes 6b41367ac6 [svn-r14892] RFC display compression ratio in h5dump
Here's the current behavior of h5dump regarding the printing of the dataset creation property list

For example

./h5dump -H -p -d filters

HDF5 "tfilters.h5" {
DATASET "deflate" {
   DATATYPE  H5T_STD_I32LE
   DATASPACE  SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
   STORAGE_LAYOUT {
      CHUNKED ( 10, 5 )
      SIZE 385 
    }
   FILTERS {
      COMPRESSION DEFLATE { LEVEL 9 }
   }
   FILLVALUE {
      FILL_TIME H5D_FILL_TIME_IFSET
      VALUE  0
   }
   ALLOCATION_TIME {
      H5D_ALLOC_TIME_INCR
   }
}
}


The proposed behavior is to add this information after SIZE

SIZE 385 (51.9%COMPRESSION)

That percentage is obtained trough

Per = (b-a) / a

Where a = theoretical size obtained by multiplying datum size times number of elements
b =  size obtained with H5Dget_storage_size

The final print would look like

HDF5 "tfilters.h5" {
DATASET "deflate" {
   DATATYPE  H5T_STD_I32LE
   DATASPACE  SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
   STORAGE_LAYOUT {
      CHUNKED ( 10, 5 )
      SIZE 385 (51.9%COMPRESSION)
    }
   FILTERS {
      COMPRESSION DEFLATE { LEVEL 9 }
   }
   FILLVALUE {
      FILL_TIME H5D_FILL_TIME_IFSET
      VALUE  0
   }
   ALLOCATION_TIME {
      H5D_ALLOC_TIME_INCR
   }
}
}

tested: windows, linux, solaris
2008-04-29 13:02:05 -05:00
..
binread.c [svn-r13503] 2007-03-12 11:36:34 -05:00
h5dump.c [svn-r14892] RFC display compression ratio in h5dump 2008-04-29 13:02:05 -05:00
h5dump.h [svn-r13874] 2007-06-18 15:03:30 -05:00
h5dumpgentest.c [svn-r14792] bug fix: #1106 h5dump -b will dump ASCII values for datasets after the first one. One variable that controls the binary output was incorrectly reset to zero after a binary output was done a first time. The effect was that on cases of several datasets, the ones after the first were not binary written. Eliminated the resetting of that variable and tested a file with several datasets. Modified the test file so that it is easier to test with the tool binread, that reads the binary output of h5dump. 2008-04-03 16:07:27 -05:00
Makefile.am [svn-r13264] Updated Makefile.am with new THG copyright notice. 2007-02-07 17:28:58 -05:00
Makefile.in [svn-r14402] Description: 2008-01-13 00:37:00 -05:00
testh5dump.sh.in [svn-r14716] remove a commented test call that was calling for an invalid block selection 2008-03-10 11:48:16 -05:00
testh5dumpxml.sh.in [svn-r14200] added tests for XML output of attribute iteration orders (same calls as DDL ) 2007-10-11 13:47:55 -05:00