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

Function EncodeBitArrayDescending

pkg/util/encoding/encoding.go:1622–1631  ·  view source on GitHub ↗

EncodeBitArrayDescending is the descending version of EncodeBitArrayAscending.

(b []byte, d bitarray.BitArray)

Source from the content-addressed store, hash-verified

1620
1621// EncodeBitArrayDescending is the descending version of EncodeBitArrayAscending.
1622func EncodeBitArrayDescending(b []byte, d bitarray.BitArray) []byte {
1623 b = append(b, bitArrayDescMarker)
1624 words, lastBitsUsed := d.EncodingParts()
1625 for _, w := range words {
1626 b = EncodeUvarintDescending(b, w)
1627 }
1628 b = append(b, bitArrayDataDescTerminator)
1629 b = EncodeUvarintDescending(b, lastBitsUsed)
1630 return b
1631}
1632
1633// DecodeBitArrayAscending decodes a bit array which was encoded using
1634// EncodeBitArrayAscending. The remainder of the input buffer and the

Callers

nothing calls this directly

Calls 2

EncodeUvarintDescendingFunction · 0.85
EncodingPartsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…