question on file layout

Hello,

I'm trying to program a significant reduced version of writing HDF files for a small embedded systems. To do this I start to analyze h5 files after I have generated them by using HDFview. I'm using this link for reference: https://www.hdfgroup.org/HDF5/doc/H5.format.html#Intro
Some questions arise that someone might be able to answer:

* If I generate an 'empty' H5 file I can analyze on a byte-by-byte level the superblock version 0. In my understanding this block has a size of 60 Bytes. This block should be followed by a 'group root table'. Unfortunately I could not find a description of such a table. If I generate an empty h5 file with HDFview it seems that right after the superblock no link in the file to the first B-Tree Node is given. The link is given in byte 80-84. Is this position fix and always the case?

* In my example the B-Tree Node starts at byte 136. However there is some information coded between byte 61 and 135 that seems to point to the HEAP table and contains other information's also. Where can I find a documentation about the range between the superblock and the first B-Tree Node?

Best Regards
Markus

Hi Markus,

···

On 4 Sep 2016, at 10:45 PM, Krug, Markus <markus.krug@hm.edu> wrote:

I’m trying to program a significant reduced version of writing HDF files for a small embedded systems. To do this I start to analyze h5 files after I have generated them by using HDFview. I’m using this link for reference: https://www.hdfgroup.org/HDF5/doc/H5.format.html#Intro

FYI someone has started a pure-Python library to access HDF5 files [1]. At the moment it’s only meant to support read-only access. The code is pretty readable if you need a hand interpreting the docs.

[1] https://github.com/jjhelmus/pyfive

Best wishes,
Andrea

--
Andrea Bedini
@andreabedini, http://www.andreabedini.com

See the impact of my research at https://impactstory.org/AndreaBedini
use https://keybase.io/andreabedini to send me encrypted messages
Key fingerprint = 17D5 FB49 FA18 A068 CF53 C5C2 9503 64C1 B2D5 9591

Hmm. I think there is a full xml scheme for the file format here...

https://www.hdfgroup.org/HDF5/XML/

That said, from what you've written below, I think you are making a lot assumptions based on just one file example.

HDF5 file format is a very flexible format. For example, boot block does NOT need to occur at offset zero. For example,

https://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetUserblock

B-tree structuers can take at least a couple of different forms devepend on how backward compatablilty is being handled, etc.

I think you *can* do what you want, but you may need to identify various constraints on the kinds of HDF5 files your solution will actuall work for.

And, if your workflows are such that you have complete control over how *all* the HDF5 files you read are created, then by definition, you can make it work within those limiations *and* still have conformant HDF5 files.

Does that make sense?

Mark

···

From: Hdf-forum <hdf-forum-bounces@lists.hdfgroup.org<mailto:hdf-forum-bounces@lists.hdfgroup.org>> on behalf of "Krug, Markus" <markus.krug@hm.edu<mailto:markus.krug@hm.edu>>
Reply-To: HDF Users Discussion List <hdf-forum@lists.hdfgroup.org<mailto:hdf-forum@lists.hdfgroup.org>>
Date: Sunday, September 4, 2016 at 7:45 AM
To: "hdf-forum@lists.hdfgroup.org<mailto:hdf-forum@lists.hdfgroup.org>" <hdf-forum@lists.hdfgroup.org<mailto:hdf-forum@lists.hdfgroup.org>>
Subject: [Hdf-forum] question on file layout

Hello,

I’m trying to program a significant reduced version of writing HDF files for a small embedded systems. To do this I start to analyze h5 files after I have generated them by using HDFview. I’m using this link for reference: https://www.hdfgroup.org/HDF5/doc/H5.format.html#Intro
Some questions arise that someone might be able to answer:

· If I generate an ‘empty’ H5 file I can analyze on a byte-by-byte level the superblock version 0. In my understanding this block has a size of 60 Bytes. This block should be followed by a ‘group root table’. Unfortunately I could not find a description of such a table. If I generate an empty h5 file with HDFview it seems that right after the superblock no link in the file to the first B-Tree Node is given. The link is given in byte 80-84. Is this position fix and always the case?

· In my example the B-Tree Node starts at byte 136. However there is some information coded between byte 61 and 135 that seems to point to the HEAP table and contains other information’s also. Where can I find a documentation about the range between the superblock and the first B-Tree Node?

Best Regards
Markus