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

Function GetMultiVarintLen

pkg/util/encoding/encoding.go:1343–1353  ·  view source on GitHub ↗

GetMultiVarintLen find the length of encoded varints that follow a 1-byte tag.

(b []byte, num int)

Source from the content-addressed store, hash-verified

1341// GetMultiVarintLen find the length of <num> encoded varints that follow a
1342// 1-byte tag.
1343func GetMultiVarintLen(b []byte, num int) (int, error) {
1344 p := 1
1345 for i := 0; i < num && p < len(b); i++ {
1346 len, err := getVarintLen(b[p:])
1347 if err != nil {
1348 return 0, err
1349 }
1350 p += len
1351 }
1352 return p, nil
1353}
1354
1355// getMultiNonsortingVarintLen finds the length of <num> encoded nonsorting varints.
1356func getMultiNonsortingVarintLen(b []byte, num int) (int, error) {

Callers 1

PeekLengthFunction · 0.85

Calls 1

getVarintLenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…