MCPcopy Create free account
hub / github.com/brimdata/super / DecodeName

Function DecodeName

context.go:581–587  ·  view source on GitHub ↗
(tv scode.Bytes)

Source from the content-addressed store, hash-verified

579}
580
581func DecodeName(tv scode.Bytes) (string, scode.Bytes) {
582 namelen, tv := DecodeLength(tv)
583 if tv == nil || namelen > len(tv) {
584 return "", nil
585 }
586 return string(tv[:namelen]), tv[namelen:]
587}
588
589func DecodeLength(tv scode.Bytes) (int, scode.Bytes) {
590 namelen, n := binary.Uvarint(tv)

Callers 2

formatTypeValueMethod · 0.92
DecodeTypeValueMethod · 0.85

Calls 1

DecodeLengthFunction · 0.85

Tested by

no test coverage detected