I have found that the HDF5-Java ((HDF5-Java 2.11, HDF5 1.8.14) is creating files with a SUPERBLOCK_VERSION of 2, and I've also found that IDL version 8.2.1 (HDF5 version 1.8.4) cannot read these files unless I first h5repack the files, which will create an identical file, except with SUPERBLOCK_VERSION of 0. Later versions of IDL (IDL 8.3/8.5, HDF5 1.8.11) IDL don't seem to have this problem.
Is there a way to specify in HDF5-Java which version of the superblock to use when creating the file?
Jarom Nelson; x33953
Computer Scientist, NIF, LLNL
Hello Jarom,
You cannot specifically tell HDF5 to use a different version of the superblock when creating an HDF5 file.
However, a different version of the superblock will get used if you specify certain features in your file.
The File Format Specification discusses the different superblock versions. I found these references to superblock version 2:
1.) https://support.hdfgroup.org/HDF5/doc/H5.format.html#Superblock :
Version 2 has some fields eliminated and compressed from superblock format versions 0 and 1. It has added checksum support and superblock extension to store additional superblock metadata
2.) https://support.hdfgroup.org/HDF5/doc/H5.format.html#SuperblockExt :
The superblock extension is used to store superblock metadata which is either optional, or added after the version of the superblock was defined. Superblock extensions may only exist when version 2 or later of the superblock is used. A superblock extension is an object header which may hold the following messages:
* Shared Message Table message<https://support.hdfgroup.org/HDF5/doc/H5.format.html#SOHMTableMessage> containing information to locate the master table of shared object header message indices.
* B-tree 'K' Values message<https://support.hdfgroup.org/HDF5/doc/H5.format.html#BtreeKValuesMessage> containing non-default B-tree 'K' values.
* Driver Info message<https://support.hdfgroup.org/HDF5/doc/H5.format.html#DrvInfoMessage> containing information needed by the file driver in order to reopen a file. See also the "Disk Format: Level 0B - File Driver Info"<https://support.hdfgroup.org/HDF5/doc/H5.format.html#DriverInfo> section above.
-Barbara
···
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Nelson, Jarom
Sent: Monday, May 01, 2017 2:15 PM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] How to specify superblock version when writing HDF5 from Java
I have found that the HDF5-Java ((HDF5-Java 2.11, HDF5 1.8.14) is creating files with a SUPERBLOCK_VERSION of 2, and I've also found that IDL version 8.2.1 (HDF5 version 1.8.4) cannot read these files unless I first h5repack the files, which will create an identical file, except with SUPERBLOCK_VERSION of 0. Later versions of IDL (IDL 8.3/8.5, HDF5 1.8.11) IDL don't seem to have this problem.
Is there a way to specify in HDF5-Java which version of the superblock to use when creating the file?
Jarom Nelson; x33953
Computer Scientist, NIF, LLNL
Barbara, thank you for your response.
I guess the trick will be to figure out what features I'm using which trigger the superblock version 2. Thanks for the links.
Jarom
···
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Barbara Jones
Sent: Thursday, July 6, 2017 9:28 AM
To: HDF Users Discussion List <hdf-forum@lists.hdfgroup.org>
Subject: Re: [Hdf-forum] How to specify superblock version when writing HDF5 from Java
Hello Jarom,
You cannot specifically tell HDF5 to use a different version of the superblock when creating an HDF5 file.
However, a different version of the superblock will get used if you specify certain features in your file.
The File Format Specification discusses the different superblock versions. I found these references to superblock version 2:
1. https://support.hdfgroup.org/HDF5/doc/H5.format.html#Superblock :
Version 2 has some fields eliminated and compressed from superblock format versions 0 and 1. It has added checksum support and superblock extension to store additional superblock metadata
1. https://support.hdfgroup.org/HDF5/doc/H5.format.html#SuperblockExt :
The superblock extension is used to store superblock metadata which is either optional, or added after the version of the superblock was defined. Superblock extensions may only exist when version 2 or later of the superblock is used. A superblock extension is an object header which may hold the following messages:
* Shared Message Table message<https://support.hdfgroup.org/HDF5/doc/H5.format.html#SOHMTableMessage> containing information to locate the master table of shared object header message indices.
* B-tree 'K' Values message<https://support.hdfgroup.org/HDF5/doc/H5.format.html#BtreeKValuesMessage> containing non-default B-tree 'K' values.
* Driver Info message<https://support.hdfgroup.org/HDF5/doc/H5.format.html#DrvInfoMessage> containing information needed by the file driver in order to reopen a file. See also the "Disk Format: Level 0B - File Driver Info"<https://support.hdfgroup.org/HDF5/doc/H5.format.html#DriverInfo> section above.
-Barbara
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Nelson, Jarom
Sent: Monday, May 01, 2017 2:15 PM
To: hdf-forum@lists.hdfgroup.org<mailto:hdf-forum@lists.hdfgroup.org>
Subject: [Hdf-forum] How to specify superblock version when writing HDF5 from Java
I have found that the HDF5-Java ((HDF5-Java 2.11, HDF5 1.8.14) is creating files with a SUPERBLOCK_VERSION of 2, and I've also found that IDL version 8.2.1 (HDF5 version 1.8.4) cannot read these files unless I first h5repack the files, which will create an identical file, except with SUPERBLOCK_VERSION of 0. Later versions of IDL (IDL 8.3/8.5, HDF5 1.8.11) IDL don't seem to have this problem.
Is there a way to specify in HDF5-Java which version of the superblock to use when creating the file?
Jarom Nelson; x33953
Computer Scientist, NIF, LLNL