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

Function EncodeCountedVarint

scode/counted.go:59–67  ·  view source on GitHub ↗
(dst []byte, i int64)

Source from the content-addressed store, hash-verified

57}
58
59func EncodeCountedVarint(dst []byte, i int64) uint {
60 var u64 uint64
61 if i >= 0 {
62 u64 = uint64(i) << 1
63 } else {
64 u64 = uint64(-i)<<1 | 1
65 }
66 return EncodeCountedUvarint(dst, u64)
67}
68
69func AppendCountedVarint(dst []byte, i int64) []byte {
70 var u64 uint64

Callers 2

EncodeIntFunction · 0.92
EncodeTimeFunction · 0.92

Calls 1

EncodeCountedUvarintFunction · 0.85

Tested by

no test coverage detected