GetMultiVarintLen find the length of encoded varints that follow a 1-byte tag.
(b []byte, num int)
| 1341 | // GetMultiVarintLen find the length of <num> encoded varints that follow a |
| 1342 | // 1-byte tag. |
| 1343 | func 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. |
| 1356 | func getMultiNonsortingVarintLen(b []byte, num int) (int, error) { |
no test coverage detected
searching dependent graphs…