read

fun read(segment: MemorySegment, offset: Long = 0): VariantMetadata

Reads metadata that begins at offset.

Structure is validated eagerly — version, widths, and the whole offset list. That is one pass over the offsets at open time, paid once per segment, and it buys the guarantee that no later accessor can walk outside the region.