Sqlite varint decoding Stage #SZ4

@rodio Reading varints conceptually works like this:

  1. Extract the lowest 7 bits from every byte
  2. Concat the 7-bit groups
  3. 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.)