Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The procedure for adding new data to an extensible array dataset in HDF5 is as follows:

  1. Open the HDF5 file containing the extensible array dataset.

  2. Open the extensible array dataset by its name or reference.

  3. Determine the current size of the dataset using the H5Dget_extent() function.

  4. Calculate the new size of the dataset after adding new data.

  5. Resize the dataset using the H5Dset_extent() function.

  6. Write the new data to the end of the dataset using the H5Dwrite() function and specifying the starting index to write at.

  7. Close the dataset and the HDF5 file.

Note: It is important to ensure that the data being added matches the datatype and dimensions of the existing array dataset. Also, the HDF5 file should be opened in the appropriate mode, such as with write permission, to enable adding new data.