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

Function DecodeTagLength

scode/bytes.go:73–82  ·  view source on GitHub ↗
(b Bytes)

Source from the content-addressed store, hash-verified

71}
72
73func DecodeTagLength(b Bytes) int {
74 u64, n := binary.Uvarint(b)
75 if n <= 0 {
76 panic(fmt.Sprintf("bad uvarint: %d", n))
77 }
78 if tagIsNull(u64) {
79 return n
80 }
81 return int(u64) + n - 1
82}
83
84func toTag(length int) uint64 {
85 return uint64(length) + 1

Callers 1

FindMethod · 0.92

Calls 1

tagIsNullFunction · 0.85

Tested by

no test coverage detected