...
You can store the file in the user block. The user block is a user definable data block at the beginning of an HDF5 file, which HDF5 ignores. There are utilities (h5jam, h5unjam) for writing to and extracting information from the user block. See this page for how to use these tools:
https://portal.hdfgroup.org/display/HDF5/Command-Line+Tools+for+Editing+HDF5+Files#Command-LineToolsforEditingHDF5Files-ublock
Also see the H5Pset_userblock function for creating a user block from within an application. The user block is a file creation property list (so it has to be done when creating the file).
For example, in C this is how you can set the user block of size 512:
fcpl = H5Pcreate (H5P_FILE_CREATE);
status = H5Pset_userblock(fcpl, 512);
file_id = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT);
status = H5Pclose(fcpl);
For details on setting or retrieving the user block from an application, see H5Pset_userblock and H5Pget_userblock.
See these examples:
- h5ublock.c - creates an HDF5 file with a user block
- h5rdub.c - reads the user block in the HDF5 file without the HDF5 library.