(b []byte)
| 45 | } |
| 46 | |
| 47 | func DecodeCountedVarint(b []byte) int64 { |
| 48 | u64 := DecodeCountedUvarint(b) |
| 49 | if u64&1 != 0 { |
| 50 | u64 >>= 1 |
| 51 | if u64 == 0 { |
| 52 | return math.MinInt64 |
| 53 | } |
| 54 | return -int64(u64) |
| 55 | } |
| 56 | return int64(u64 >> 1) |
| 57 | } |
| 58 | |
| 59 | func EncodeCountedVarint(dst []byte, i int64) uint { |
| 60 | var u64 uint64 |
no test coverage detected