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

Function AppendCountedVarint

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

Source from the content-addressed store, hash-verified

67}
68
69func AppendCountedVarint(dst []byte, i int64) []byte {
70 var u64 uint64
71 if i >= 0 {
72 u64 = uint64(i) << 1
73 } else {
74 u64 = uint64(-i)<<1 | 1
75 }
76 return AppendCountedUvarint(dst, u64)
77}

Callers 1

AppendIntFunction · 0.92

Calls 1

AppendCountedUvarintFunction · 0.85

Tested by

no test coverage detected