MCPcopy
hub / github.com/pingcap/tidb / encodeUnsignedInt

Function encodeUnsignedInt

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

Source from the content-addressed store, hash-verified

269}
270
271func encodeUnsignedInt(b []byte, v uint64, comparable1 bool) []byte {
272 if comparable1 {
273 b = append(b, uintFlag)
274 b = EncodeUint(b, v)
275 } else {
276 b = append(b, uvarintFlag)
277 b = EncodeUvarint(b, v)
278 }
279 return b
280}
281
282func valueSizeOfUnsignedInt(v uint64) int {
283 // flag occupy 1 bit and at lease 1 bit.

Callers 3

encodeFunction · 0.85
HashCodeFunction · 0.85

Calls 2

EncodeUintFunction · 0.85
EncodeUvarintFunction · 0.85

Tested by 1