public static long readVarlong(ByteBuffer buffer)  {
        long raw =  readUnsignedVarlong(buffer);
        return (raw >>> 1) ^ -(raw & 1);
    }
Read a long stored in variable-length format using zig-zag decoding from
<a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"> Google Protocol Buffers</a>.

@param buffer The buffer to read from
@return The long value read

@throws IllegalArgumentException if variable-length value does not terminate after 10 bytes have been read
clients/src/main/java/org/apache/kafka/common/utils/ByteUtils.java