tuple.go
func (t *Tuple) Offset(field string) (int, error) {
	index, exists := t.Header.Type.Offset(field)
	if !exists {
		return 0, ErrFieldDoesNotExist
	}

	// Tuple type and tuple header do not agree on fields
	if index < 0 || index >= int(t.Header.FieldCount) {
		return 0, ErrInvalidFieldIndex
	}
	return int(t.Header.Offsets[index]), nil
}
func (t *Tuple) Offset(field string) (int, error) {
	index, exists := t.Header.Type.Offset(field)
	if !exists {
		return 0, ErrFieldDoesNotExist
	}

	// Tuple type and tuple header do not agree on fields
	if index < 0 || index >= int(t.Header.FieldCount) {
		return 0, ErrInvalidFieldIndex
	}
	return int(t.Header.Offsets[index]), nil
}
// Offset returns the byte offset for the given field