decode

fun decode(bytes: ByteArray, offset: Int = 0): VbiResult

Decode a Variable Byte Integer from the given bytes starting at offset.

Return

A VbiResult containing the decoded value and number of bytes consumed.

Throws

if the encoding is malformed.