Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDF5: Specification lacks section on how data types are stored. #117

Open
hoene opened this issue Apr 13, 2020 · 1 comment
Open

HDF5: Specification lacks section on how data types are stored. #117

hoene opened this issue Apr 13, 2020 · 1 comment
Assignees

Comments

@hoene
Copy link
Owner

hoene commented Apr 13, 2020

In the HDF5 spec "IV.A.2.m. The Attribute Message" fields "Data (variable size)":

I have not found any section in the specification on how the data is actually stored.

I had to reengineer the entire code. Please refer to

int readDataVar(struct READER *reader, struct DATAOBJECT *data,
till line 769

Please clarify.

FYI @gheber

@gheber gheber self-assigned this Apr 13, 2020
@gheber
Copy link
Collaborator

gheber commented Apr 14, 2020

We should have a call on this, but here's the gist. Since HDF5 1.8, attributes can be stored either in compact or dense form. The difference is that for compactly stored attributes there is a size limit on the attribute value (the "Data" field), which is the same as that for datasets with compact layout (slightly under 64 KB). The values of densely stored attributes can be of arbitrary size and are stored in a fractal heap and NOT in the "Data" field of the attribute message. For a densely stored attribute, there would be an Attribute Info Message, see "IV.A.2.v. The Attribute Info Message."

In any event, the binary representation (bytes on disk, encoding) is exactly the same as for dataset elements and values. That's why it's not repeated for attributes. Both HDF5 datasets and attributes are what one might call "HDF5 array variables." The difference between them is functional. Send me your availability and we'll schedule a call to talk this over!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants