compound datatype

    i'm writing a "read_h5" to memory buffer. when i'm writing to h5,i use
the struct s1_t below. when i'm reading back that h5, since it's a compound
data type
writing to a h5 file(write_h5 part)


        typedef struct s1_t {
        int a;
        float b;
        double c;
        s1_t s1[LENGTH];
        hid_t s1_tid;
        s1_tid = H5Tcreate(H5T_COMPOUND,sizeof(s1_t)); // <<compound data
dataset =

reading h5 file(read_h5 part)
        typedef struct s1_t {---}; s2_t ....... s100_t;

hid_t s1_tid;
s1_tid = H5Tcreate(H5T_COMPOUND,sizeof(s1_t)); // <<compound data type
//WHAT IF I HAVE 100 struct? i have to do H5Tcreate for each struct i have
and do "H5Tequal" for 100 times
hid_t ss_tid;
        ss_tid = H5Dget_type(dataset);
            printf("equal datatype\n");

//any easy way to get the compound datatype of a dataset without comparing
with each struct we have?