MCPcopy Index your code
hub / github.com/pingcap/tidb / encodeSignedInt

Function encodeSignedInt

pkg/util/codec/codec.go:246–255  ·  view source on GitHub ↗
(b []byte, v int64, comparable1 bool)

Source from the content-addressed store, hash-verified

244}
245
246func encodeSignedInt(b []byte, v int64, comparable1 bool) []byte {
247 if comparable1 {
248 b = append(b, intFlag)
249 b = EncodeInt(b, v)
250 } else {
251 b = append(b, varintFlag)
252 b = EncodeVarint(b, v)
253 }
254 return b
255}
256
257func valueSizeOfSignedInt(v int64) int {
258 if v < 0 {

Callers 4

encodeFunction · 0.85
HashGroupKeyFunction · 0.85
HashCodeFunction · 0.85
TestValueSizeOfSignedIntFunction · 0.85

Calls 2

EncodeIntFunction · 0.85
EncodeVarintFunction · 0.85

Tested by 1

TestValueSizeOfSignedIntFunction · 0.68