Creates a dataset in an HDF5 file.
Arguments:
loc_id: The group the dataset should be created in.
fmt: A string describing the format of the datatype, e.g. char, short, ...
name: The name that should be used for the dataset.
ndims: The rank of the data to be written.
dims: The dimensions of the data, a pointer to ndims number of hsize_t values.
buf: The data to be written in the dataset, if NULL, an empty dataset will be created.
compress: The compression level on the dataset, betwen 0-9 where 0 is no compression and 9 is highest compression.
Returns -1 on failure, otherwise a hid_t reference to the dataset.