OUT: Buffer into which the property list will be encoded If the provided buffer is NULL, the size of the buffer required is returned through nalloc; the function does nothing more.
OUT: The size of the required buffer
IN: File access property list
H5P_ENCODE2 encodes the property list plist_id into the binary buffer buf, according to the file format setting specified by the file access property list fapl_id.
If the required buffer size is unknown, buf can be passed in as NULL and the function will set the required buffer size in nalloc. The buffer can then be created and the property list encoded with a subsequent H5P_ENCODE2 call.
If the buffer passed in is not big enough to hold the encoded properties, the H5P_ENCODE2 call can be expected to fail with a segmentation fault.
The file access property list fapl_id is used to control the encoding via the libver_bounds property (see H5P_SET_LIBVER_BOUNDS). If the libver_bounds property is missing, H5P_ENCODE2 proceeds as if the libver_bounds property were set to (H5F_LIBVER_EARLIEST, H5F_LIBVER_LATEST). (Functionally, H5P_ENCODE1 is identical to H5P_ENCODE2 with libver_bounds set to (H5F_LIBVER_EARLIEST, H5F_LIBVER_LATEST).)
Properties that do not have encode callbacks will be skipped. There is currently no mechanism to register an encode callback for a user-defined property, so user-defined properties cannot currently be encoded.
Some properties cannot be encoded, particularly properties that are reliant on local context.