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

Function GetMultiVarintLen

pkg/util/encoding/encoding.go:1898–1908  ·  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

1896// GetMultiVarintLen find the length of <num> encoded varints that follow a
1897// 1-byte tag.
1898func GetMultiVarintLen(b []byte, num int) (int, error) {
1899 p := 1
1900 for i := 0; i < num && p < len(b); i++ {
1901 len, err := getVarintLen(b[p:])
1902 if err != nil {
1903 return 0, err
1904 }
1905 p += len
1906 }
1907 return p, nil
1908}
1909
1910// getMultiNonsortingVarintLen finds the length of <num> encoded nonsorting varints.
1911func 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…