void writeBackwards(long v) {
    int lastPos = pos + asciiSizeInBytes(v); // We write backwards from right to left.
    pos = lastPos;
    while (v != 0) {
      int digit = (int) (v % 10);
      buf[--lastPos] = (byte) HEX_DIGITS[digit];
      v /= 10;
    }
  }
Writes are unsafe as they do no bounds checks. This means you should take care to allocate or
wrap an array at least as big as you need prior to writing. As it is possible to calculate size
prior to writing, overrunning a buffer is a programming error.
zipkin/src/main/java/zipkin2/internal/WriteBuffer.java