Closed ghost closed 2 years ago
Related to this proposed h5py feature: https://github.com/h5py/h5py/issues/429.
This is no more the case with the current h5json master branch. Example:
HDF5 "data/hdf5/vlen_string_nullterm_dset.h5" {
GROUP "/" {
DATASET "DS1" {
DATATYPE H5T_STRING {
STRSIZE H5T_VARIABLE;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
}
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
DATA {
(0): "This", "is a", "nullterm", "string."
}
}
}
}
h5tojson
output
{
"apiVersion": "1.1.1",
"datasets": {
"ab8aa27a-996b-11ec-89a6-8c8590747994": {
"alias": [
"/DS1"
],
"creationProperties": {
"allocTime": "H5D_ALLOC_TIME_LATE",
"fillTime": "H5D_FILL_TIME_ALLOC",
"layout": {
"class": "H5D_CONTIGUOUS"
}
},
"shape": {
"class": "H5S_SIMPLE",
"dims": [
4
]
},
"type": {
"charSet": "H5T_CSET_ASCII",
"class": "H5T_STRING",
"length": "H5T_VARIABLE",
"strPad": "H5T_STR_NULLTERM"
},
"value": [
"This",
"is a",
"nullterm",
"string."
]
}
},
"groups": {
"ab895e06-996b-11ec-89a6-8c8590747994": {
"alias": [
"/"
],
"links": [
{
"class": "H5L_TYPE_HARD",
"collection": "datasets",
"id": "ab8aa27a-996b-11ec-89a6-8c8590747994",
"title": "DS1"
}
]
}
},
"root": "ab895e06-996b-11ec-89a6-8c8590747994"
}
Currently, it reports H5T_STR_NULLPAD when h5dump says it's a H5T_STR_NULLTERM.