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

Function ReadTag

scode/bytes.go:60–71  ·  view source on GitHub ↗
(r io.ByteReader)

Source from the content-addressed store, hash-verified

58}
59
60func ReadTag(r io.ByteReader) (int, error) {
61 // The tag is zero for a null value; otherwise, it is the value's
62 // length plus one.
63 u64, err := binary.ReadUvarint(r)
64 if err != nil {
65 return 0, err
66 }
67 if tagIsNull(u64) {
68 return -1, nil
69 }
70 return tagLength(u64), nil
71}
72
73func DecodeTagLength(b Bytes) int {
74 u64, n := binary.Uvarint(b)

Callers 1

decodeValMethod · 0.92

Calls 2

tagIsNullFunction · 0.85
tagLengthFunction · 0.85

Tested by

no test coverage detected