file = {segment}
segment = head_segment | data_segment | index_segment

head_segment = MAGIC_HEAD, {head_subsection}
head_subsection = MAGIC_GROUP, groups | MAGIC_DIM, dims | MAGIC_ATT, atts | MAGIC_VAR, vars

groups = ngroups, {objId, parentGroupObjId, name}*ngroups
dims = ndims, {dimId, parentGroupObjId, name, dimLength, dimFlags}*ndims
atts = natts, {parentObjId, name, dataType, nvals, vals}*natts
vars = nvars, {objId, parentGroupObjId, parentStructureObjId, name, dataType, varFlags, ndim, {dimId}}*nvars

data_segment = MAGIC_DATA, objId, elemSize, section, vals
section = nranges, {origin, size}*nranges

index_segment = MAGIC_INDEX, nindices, {objId, elemSize, section, filePos}
filePos = VLEN8

ngroups, ndims, dimLength, dimFlags, natts, dataType, nchars, nvals, nvars, elemSize, nranges, origin, size = VLEN4
objId, parentGroupObjId, parentStructureObjId = VLEN4
vals = {BYTE} | {SHORT} | {INT} | {LONG} | {FLOAT} | {DOUBLE} | {STRING}

name, varname = STRING
dataType = TYPE_BYTE=1 | TYPE_SHORT=2 | TYPE_INT=3 | TYPE_FLOAT=4 | TYPE_DOUBLE=5 | TYPE_LONG=6 | TYPE_STRING=7 | TYPE_STRUCTURE=8
dimFlags = BIT0=0==shared & BIT1=1==unlimited & BIT2=1==vlen
varFlags = BIT0=0==signed & BIT1=0==bigendian

VLEN4 = variable length encoded 4-byte integer
VLEN8 = variable length encoded 8-byte integer
STRING = nchars, {UTF}

strides ?
enums
structs