izihawa_types/var.py
def process_varint(payload, inverted=False):
    """Read a varint from `stream`"""
    shift = 0
    result = 0
    count = 0
    while True:
        i = payload[count]
        count += 1
        result |= (i & 0x7f) << shift
        shift += 7
        if bool(i & 0x80) == inverted:
            break
    return result, count
Read a varint from `stream`
Read a varint from `stream`
Read a varint from ` stream `
def process_varint(payload, inverted=False):
    shift = 0
    result = 0
    count = 0
    while True:
        i = payload[count]
        count += 1
        result |= (i & 0x7f) << shift
        shift += 7
        if bool(i & 0x80) == inverted:
            break
    return result, count
def process_varint ( payload , inverted = False ) : shift = 0 result = 0 count = 0 while True : i = payload [ count ] count += 1 result |= ( i & 0x7f ) << shift shift += 7 if bool ( i & 0x80 ) == inverted : break return result , count
Read a varint from `stream`
Read a varint from ` stream `
"""Read a varint from `stream`"""
payload
inverted