void writeVarint(long v) {
    while ((v & ~0x7fL) != 0) {
      writeByte((byte) ((v & 0x7f) | 0x80));
      v >>>= 7;
    }
    writeByte((byte) v);
  }
This transcodes a UTF-16 Java String to UTF-8 bytes.

<p>This looks most similar to {@code io.netty.buffer.ByteBufUtil.writeUtf8(AbstractByteBuf,
int, CharSequence, int)} v4.1, modified including features to address ASCII runs of text.
zipkin/src/main/java/zipkin2/internal/WriteBuffer.java