Compound data type with zero-sized dimension

My program has already been using the group/dataset approach.
Switching to compound data type was suggested by @steven
in this discussion which can improve the I/O performance for me.