package flatbuffers
type FlatBuffer interface {
Table () Table
Init (buf []byte , i UOffsetT )
}
func GetRootAs (buf []byte , offset UOffsetT , fb FlatBuffer ) {
n := GetUOffsetT (buf [offset :])
fb .Init (buf , n +offset )
}
func GetSizePrefixedRootAs (buf []byte , offset UOffsetT , fb FlatBuffer ) {
n := GetUOffsetT (buf [offset +sizePrefixLength :])
fb .Init (buf , n +offset +sizePrefixLength )
}
func GetSizePrefix (buf []byte , offset UOffsetT ) uint32 {
return GetUint32 (buf [offset :])
}
func GetIndirectOffset (buf []byte , offset UOffsetT ) UOffsetT {
return offset + GetUOffsetT (buf [offset :])
}
func GetBufferIdentifier (buf []byte ) string {
return string (buf [SizeUOffsetT :][:fileIdentifierLength ])
}
func GetSizePrefixedBufferIdentifier (buf []byte ) string {
return string (buf [SizeUOffsetT +sizePrefixLength :][:fileIdentifierLength ])
}
func BufferHasIdentifier (buf []byte , identifier string ) bool {
return GetBufferIdentifier (buf ) == identifier
}
func SizePrefixedBufferHasIdentifier (buf []byte , identifier string ) bool {
return GetSizePrefixedBufferIdentifier (buf ) == identifier
}
The pages are generated with Golds v0.8.2 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .