code: public static int computeMessageSetExtensionSize(
        final int fieldNumber, final MessageLite value) {
      return computeTagSize(WireFormat.MESSAGE_SET_ITEM) * 2 +
             computeUInt32Size(WireFormat.MESSAGE_SET_TYPE_ID, fieldNumber) +
             computeMessageSize(WireFormat.MESSAGE_SET_MESSAGE, value);
    }
docs: Compute the number of bytes that would be needed to encode a
  MessageSet extension to the stream.  For historical reasons,
  the wire format differs from normal fields.