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

Function encodeBytes

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

Source from the content-addressed store, hash-verified

220}
221
222func encodeBytes(b []byte, v []byte, comparable1 bool) []byte {
223 if comparable1 {
224 b = append(b, bytesFlag)
225 b = EncodeBytes(b, v)
226 } else {
227 b = append(b, compactBytesFlag)
228 b = EncodeCompactBytes(b, v)
229 }
230 return b
231}
232
233func valueSizeOfBytes(v []byte) int {
234 return valueSizeOfSignedInt(int64(len(v))) + len(v)

Callers 5

encodeFunction · 0.70
encodeStringFunction · 0.70
HashGroupKeyFunction · 0.70
HashCodeFunction · 0.70
TestColumnEncodeFunction · 0.50

Calls 2

EncodeBytesFunction · 0.85
EncodeCompactBytesFunction · 0.85

Tested by 1

TestColumnEncodeFunction · 0.40