Example #1
0
 public long readZLong() throws IOException {
   long accumulator = 0L;
   int i = 0;
   long currentByte;
   while (((currentByte = readByte()) & 0x80L) != 0) {
     accumulator |= (currentByte & 0x7F) << i;
     i += 7;
     if (i > 63) {
       throw new IOException("variable-length stream is too long");
     }
   }
   return BitUtil.zigZagDecode(accumulator | (currentByte << i));
 }
 public GeoPoint resetFromGeoHash(long geohashLong) {
   final int level = (int) (12 - (geohashLong & 15));
   return this.resetFromIndexHash(BitUtil.flipFlop((geohashLong >>> 4) << ((level * 5) + 2)));
 }