Here you can find the source of zigZagDecode(int i)
private static final int zigZagDecode(int i)
//package com.java2s; //License from project: Apache License public class Main { /** Decode an int previously encoded with {@link #zigZagEncode(int)}. */ private static final int zigZagDecode(int i) { return ((i >>> 1) ^ -(i & 1)); }//from w ww . j ava2 s .c om /** Decode a long previously encoded with {@link #zigZagEncode(long)}. */ private static final long zigZagDecode(long l) { return ((l >>> 1) ^ -(l & 1)); } }