List of usage examples for org.apache.lucene.util BitUtil zigZagDecode
public static long zigZagDecode(long l)
From source file:org.codelibs.elasticsearch.common.io.stream.StreamInput.java
License:Apache License
public long readZLong() throws IOException { long accumulator = 0L; int i = 0;//from w w w . j a va 2 s.c o m 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)); }