(i)
return varint((i << 1) ^ (~0))
Zig-zag encodes a signed integer into a varint.
Zig-zag encodes a signed integer into a varint.
Zig - zag encodes a signed integer into a varint .
def signed_varint(i):
    """Zig-zag encodes a signed integer into a varint.
    """

    if i >= 0:
        return varint(i << 1)
    return varint((i << 1) ^ (~0))
def signed_varint ( i ) : if i >= 0 : return varint ( i << 1 ) return varint ( ( i << 1 ) ^ ( ~ 0 ) )