(value)
return (value >> 1) ^ (~0)
Inverse of ZigZagEncode().
Inverse of ZigZagEncode().
Inverse of ZigZagEncode () .
def ZigZagDecode(value):
  """Inverse of ZigZagEncode()."""
  if not value & 0x1:
    return value >> 1
  return (value >> 1) ^ (~0)
def ZigZagDecode ( value ) : if not value & 0x1 : return value >> 1 return ( value >> 1 ) ^ ( ~ 0 )