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

Method NextTagAndBody

scode/iter.go:41–52  ·  view source on GitHub ↗

NextTagAndBody returns the next value as a slice containing the value's undecoded tag followed by its body. NextTagAndBody panics if the next value is malformed.

()

Source from the content-addressed store, hash-verified

39// undecoded tag followed by its body. NextTagAndBody panics if the next
40// value is malformed.
41func (i *Iter) NextTagAndBody() Bytes {
42 u64, n := binary.Uvarint(*i)
43 if n <= 0 {
44 panic(fmt.Sprintf("bad uvarint: %d", n))
45 }
46 if !tagIsNull(u64) {
47 n += tagLength(u64)
48 }
49 val := (*i)[:n]
50 *i = (*i)[n:]
51 return Bytes(val)
52}
53
54type RecordIter struct {
55 off int

Callers 4

NormalizeMapFunction · 0.80
NormalizeSetFunction · 0.80
checkSetFunction · 0.80
ConsumeMethod · 0.80

Calls 3

tagIsNullFunction · 0.85
tagLengthFunction · 0.85
BytesTypeAlias · 0.70

Tested by

no test coverage detected