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

Function EncodeBitArrayDescending

pkg/util/encoding/encoding.go:1138–1147  ·  view source on GitHub ↗

EncodeBitArrayDescending is the descending version of EncodeBitArrayAscending.

(b []byte, d bitarray.BitArray)

Source from the content-addressed store, hash-verified

1136
1137// EncodeBitArrayDescending is the descending version of EncodeBitArrayAscending.
1138func EncodeBitArrayDescending(b []byte, d bitarray.BitArray) []byte {
1139 b = append(b, bitArrayDescMarker)
1140 words, lastBitsUsed := d.EncodingParts()
1141 for _, w := range words {
1142 b = EncodeUvarintDescending(b, w)
1143 }
1144 b = append(b, bitArrayDataDescTerminator)
1145 b = EncodeUvarintDescending(b, lastBitsUsed)
1146 return b
1147}
1148
1149// DecodeBitArrayAscending decodes a bit array which was encoded using
1150// 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…