MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / EncodeUntaggedBitArrayValue

Function EncodeUntaggedBitArrayValue

pkg/util/encoding/encoding.go:2774–2783  ·  view source on GitHub ↗

EncodeUntaggedBitArrayValue encodes a bit array value, appends it to the supplied buffer, and returns the final buffer.

(appendTo []byte, d bitarray.BitArray)

Source from the content-addressed store, hash-verified

2772// EncodeUntaggedBitArrayValue encodes a bit array value, appends it to the
2773// supplied buffer, and returns the final buffer.
2774func EncodeUntaggedBitArrayValue(appendTo []byte, d bitarray.BitArray) []byte {
2775 bitLen := d.BitLen()
2776 words, _ := d.EncodingParts()
2777
2778 appendTo = EncodeNonsortingUvarint(appendTo, uint64(bitLen))
2779 for _, w := range words {
2780 appendTo = EncodeUint64Ascending(appendTo, w)
2781 }
2782 return appendTo
2783}
2784
2785// EncodeUUIDValue encodes a uuid.UUID value with its value tag, appends it to
2786// the supplied buffer, and returns the final buffer.

Callers 1

EncodeBitArrayValueFunction · 0.85

Calls 4

EncodeNonsortingUvarintFunction · 0.85
EncodeUint64AscendingFunction · 0.85
BitLenMethod · 0.80
EncodingPartsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…