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

Function EncodeCountedUvarint

scode/counted.go:23–31  ·  view source on GitHub ↗
(dst []byte, u64 uint64)

Source from the content-addressed store, hash-verified

21}
22
23func EncodeCountedUvarint(dst []byte, u64 uint64) uint {
24 var n uint
25 for u64 != 0 {
26 dst[n] = byte(u64)
27 u64 >>= 8
28 n++
29 }
30 return n
31}
32
33func AppendCountedUvarint(dst []byte, u64 uint64) []byte {
34 for u64 != 0 {

Callers 2

EncodeUintFunction · 0.92
EncodeCountedVarintFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected