public static void writeVarint(int value, DataOutput out) throws IOException {
        writeUnsignedVarint((value << 1) ^ (value >> 31), out);
    }
Write the given integer following the variable-length zig-zag encoding from
<a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"> Google Protocol Buffers</a>
into the output.

@param value The value to write
@param out The output to write to
clients/src/main/java/org/apache/kafka/common/utils/ByteUtils.java