code: def _unpack_int_base128(varint, offset):
          
          res = ord(varint[offset])
          if ord(varint[offset]) >= 0x80:
              offset += 1
              res = ((res - 0x80) << 7) + ord(varint[offset])
              if ord(varint[offset]) >= 0x80:
                  offset += 1
                  res = ((res - 0x80) << 7) + ord(varint[offset])
                  if ord(varint[offset]) >= 0x80:
                      offset += 1
                      res = ((res - 0x80) << 7) + ord(varint[offset])
                      if ord(varint[offset]) >= 0x80:
                          offset += 1
                          res = ((res - 0x80) << 7) + ord(varint[offset])
          return res, offset + 1
docs: Implement Perl unpack's 'w' option, aka base 128 decoding.