code: public void writeRawVarint64(long value) throws IOException {
      while (true) {
        if ((value & ~0x7FL) == 0) {
          writeRawByte((int)value);
          return;
        } else {
          writeRawByte(((int)value & 0x7F) | 0x80);
          value >>>= 7;
        }
      }
    }
docs: Encode and write a varint.