@rodio Reading varints conceptually works like this:
- Extract the lowest 7 bits from every byte
- Concat the 7-bit groups
- Interpret the concatenated binary number
In this case:
0x81 == 1000 0001 (The leading 1 means continue reading.)
extract: 000 0001
0x47 == 0100 0111 (The leading 0 means stop reading.)
extract: 100 0111
Concat 000 0001 + 100 0111
== 000 0001 100 0111
== 000 000 1100 0111
== 1100 0111 (This is 199 in decimal.)