mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-12-21 07:51:46 +08:00
6b41367ac6
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
24 lines
520 B
SQL
24 lines
520 B
SQL
#############################
|
|
Expected output for 'h5dump -H -p -d scaleoffset tfilters.h5'
|
|
#############################
|
|
HDF5 "tfilters.h5" {
|
|
DATASET "scaleoffset" {
|
|
DATATYPE H5T_STD_I32LE
|
|
DATASPACE SIMPLE { ( 20, 10 ) / ( 20, 10 ) }
|
|
STORAGE_LAYOUT {
|
|
CHUNKED ( 10, 5 )
|
|
SIZE 152 (81.0%COMPRESSION)
|
|
}
|
|
FILTERS {
|
|
COMPRESSION SCALEOFFSET { MIN BITS 4 }
|
|
}
|
|
FILLVALUE {
|
|
FILL_TIME H5D_FILL_TIME_IFSET
|
|
VALUE 0
|
|
}
|
|
ALLOCATION_TIME {
|
|
H5D_ALLOC_TIME_INCR
|
|
}
|
|
}
|
|
}
|