package flatbuffers

// FlatBuffer is the interface that represents a flatbuffer.
type FlatBuffer interface {
	Table() Table
	Init(buf []byte, i UOffsetT)
}

// GetRootAs is a generic helper to initialize a FlatBuffer with the provided buffer bytes and its data offset.
func ( []byte,  UOffsetT,  FlatBuffer) {
	 := GetUOffsetT([:])
	.Init(, +)
}

// GetSizePrefixedRootAs is a generic helper to initialize a FlatBuffer with the provided size-prefixed buffer
// bytes and its data offset
func ( []byte,  UOffsetT,  FlatBuffer) {
	 := GetUOffsetT([+sizePrefixLength:])
	.Init(, ++sizePrefixLength)
}

// GetSizePrefix reads the size from a size-prefixed flatbuffer
func ( []byte,  UOffsetT) uint32 {
	return GetUint32([:])
}

// GetIndirectOffset retrives the relative offset in the provided buffer stored at `offset`.
func ( []byte,  UOffsetT) UOffsetT {
	return  + GetUOffsetT([:])
}

// GetBufferIdentifier returns the file identifier as string
func ( []byte) string {
	return string([SizeUOffsetT:][:fileIdentifierLength])
}

// GetBufferIdentifier returns the file identifier as string for a size-prefixed buffer
func ( []byte) string {
	return string([SizeUOffsetT+sizePrefixLength:][:fileIdentifierLength])
}

// BufferHasIdentifier checks if the identifier in a buffer has the expected value
func ( []byte,  string) bool {
	return GetBufferIdentifier() == 
}

// BufferHasIdentifier checks if the identifier in a buffer has the expected value for a size-prefixed buffer
func ( []byte,  string) bool {
	return GetSizePrefixedBufferIdentifier() == 
}