def ZigZagEncode(value):
  if value >= 0:
    return value << 1
  return (value << 1) ^ (~0)
ZigZag Transform:  Encodes signed integers so that they can be
dataset/ETHPy150Open M4rtinK/modrana/core/bundle/__google/protobuf/internal/wire_format.py/ZigZagEncode