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

Function SizeOfUvarint

scode/bytes.go:51–58  ·  view source on GitHub ↗

SizeOfUvarint returns the number of bytes required by binary.AppendUvarint to represent u64.

(u64 uint64)

Source from the content-addressed store, hash-verified

49// SizeOfUvarint returns the number of bytes required by binary.AppendUvarint to
50// represent u64.
51func SizeOfUvarint(u64 uint64) int {
52 n := 1
53 for u64 >= 0x80 {
54 n++
55 u64 >>= 7
56 }
57 return n
58}
59
60func ReadTag(r io.ByteReader) (int, error) {
61 // The tag is zero for a null value; otherwise, it is the value's

Callers 5

readCompMethod · 0.92
readCompressedFrameMethod · 0.92
writeCompHeaderMethod · 0.92
EndContainerMethod · 0.85
EndContainerWithNonesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected