Add helper function to compute H5TB record size from field types and offsets
Open
Component - Tools
- Dominant language
- C
- Stars
- 988
- Forks
- 355
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 12
Description
When using H5TBmake_table without a predefined C struct, users must manually supply type_size — the total size in bytes of one table record. The [discussion on the Forum](https://forum.hdfgroup.org/t/creating-a-compound-datatype-with-no-predefined-struct/13098), illustrates the potential confusion.
type_size must be computed from the field types and offsets, but no utility exists to do this. A helper function can be added to accept the field type array and field offset array and return the correct record size. The record size is the offset of the last field plus its H5Tget_size(), plus any trailing padding bytes implied by the offsets.
Contributor guide
Assessment
This issue has not been assessed yet.