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

Function getMultiNonsortingVarintLen

pkg/util/encoding/encoding.go:1356–1366  ·  view source on GitHub ↗

getMultiNonsortingVarintLen finds the length of encoded nonsorting varints.

(b []byte, num int)

Source from the content-addressed store, hash-verified

1354
1355// getMultiNonsortingVarintLen finds the length of <num> encoded nonsorting varints.
1356func getMultiNonsortingVarintLen(b []byte, num int) (int, error) {
1357 p := 0
1358 for i := 0; i < num && p < len(b); i++ {
1359 _, len, _, err := DecodeNonsortingStdlibVarint(b[p:])
1360 if err != nil {
1361 return 0, err
1362 }
1363 p += len
1364 }
1365 return p, nil
1366}
1367
1368// PeekLength returns the length of the encoded value at the start of b. Note:
1369// if this function succeeds, it's not a guarantee that decoding the value will

Callers 1

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…