decode

fun decode(input: ByteArray): <Error class: unknown class><Int, Int>

Decodes the given ByteArray input from Varint format to a Pair of Integers. The function extracts the integer represented by the Varint and the number of bytes read to decode the integer.

Return

A Pair where the first element is the decoded integer and the second element is the number of bytes read from input to decode the integer.

Parameters

input

The ByteArray to be decoded, representing an integer in Varint format.

Throws

If the Varint is malformed and too long.