private static void innerWriteUnsignedVarlongUnrolled(long value, ByteBuffer buffer) {
        if ((value & (0xFFFFFFFFFFFFFFFFL << 35)) == 0) {
            buffer.put((byte) (value >>> 28));
        } else {
            buffer.put((byte) ((value >>> 28) & 0x7FL | 0x80));
            if ((value & (0xFFFFFFFFFFFFFFFFL << 42)) == 0) {
                buffer.put((byte) (value >>> 35));
            } else {
                buffer.put((byte) ((value >>> 35) & 0x7FL | 0x80));
                if ((value & (0xFFFFFFFFFFFFFFFFL << 49)) == 0) {
                    buffer.put((byte) (value >>> 42));
                } else {
                    buffer.put((byte) ((value >>> 42) & 0x7FL | 0x80));
                    if ((value & (0xFFFFFFFFFFFFFFFFL << 56)) == 0) {
                        buffer.put((byte) (value >>> 49));
                    } else {
                        buffer.put((byte) ((value >>> 49) & 0x7FL | 0x80));
                        if ((value & (0xFFFFFFFFFFFFFFFFL << 63)) == 0) {
                            buffer.put((byte) (value >>> 56));
                        } else {
                            buffer.put((byte) ((value >>> 56) & 0x7FL | 0x80));
                            buffer.put((byte) (value >>> 63));
                        }
                    }
                }
            }
        }
    }
Implementation extended from Int implementation from Netty
see: https://github.com/netty/netty/blob/59aa6e635b9996cf21cd946e64353270679adc73/codec/src/main/java/io/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoder.java#L73
jmh-benchmarks/src/main/java/org/apache/kafka/jmh/util/ByteUtilsBenchmark.java