<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Protocol Buffer &#8211; 编码无悔 /  Intent &amp; Focused</title>
	<atom:link href="https://www.codelast.com/tag/protocol-buffer/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codelast.com</link>
	<description>最优化之路</description>
	<lastBuildDate>Sun, 03 May 2020 13:09:03 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>[原创] Google Protocol Buffers中文教程</title>
		<link>https://www.codelast.com/google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b/</link>
					<comments>https://www.codelast.com/google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b/#comments</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Sun, 27 Oct 2013 08:43:29 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[综合]]></category>
		<category><![CDATA[Avro]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[MessagePack]]></category>
		<category><![CDATA[Protocol Buffer]]></category>
		<category><![CDATA[Protocol Buffers]]></category>
		<category><![CDATA[Thrift]]></category>
		<category><![CDATA[中文]]></category>
		<category><![CDATA[使用]]></category>
		<category><![CDATA[教程]]></category>
		<guid isPermaLink="false">http://www.codelast.com/?p=8</guid>

					<description><![CDATA[<p>
	注：前面这些是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助。</p>
<div>
	<a href="http://www.codelast.com/?p=280" rel="noopener noreferrer" target="_blank">Protocol Buffer Basics: C++中文翻译（Google Protocol Buffers中文教程）</a></div>
<div>
	&#160;</div>
<div>
	<a href="http://www.codelast.com/?p=299" rel="noopener noreferrer" target="_blank">Language Guide中文翻译（Google Protocol Buffers中文教程）</a></div>
<div>
	&#160;</div>
<div>
	<a href="http://www.codelast.com/?p=305" rel="noopener noreferrer" target="_blank">Style Guide中文翻译（Google Protocol Buffers中文教程）</a></div>
<div>
	&#160;</div>
<div>
	<a href="http://www.codelast.com/?p=316" rel="noopener noreferrer" target="_blank">Techniques 中文翻译（Google Protocol Buffers中文教程）</a>
<div>
<span id="more-8"></span>		<br />
		下面是我使用Google Protocol Buffers的一些总结：
<p>		<a href="http://www.codelast.com/?p=8519" rel="noopener noreferrer" target="_blank">Protocol Buffers的Emacs语法高亮</a></p></div>
</div>
<p>
	&#160;</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<br />
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
	<span style="color: rgb(255, 0, 0);">➤➤</span>&#160;版权声明&#160;<span style="color: rgb(255, 0, 0);">➤➤</span>&#160;<br />
	转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&#160;<br />
	感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" />&#8230; <a href="https://www.codelast.com/google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b/" class="read-more">Read More </a></p>]]></description>
										<content:encoded><![CDATA[<p>
	注：前面这些是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助。</p>
<div>
	<a href="http://www.codelast.com/?p=280" rel="noopener noreferrer" target="_blank">Protocol Buffer Basics: C++中文翻译（Google Protocol Buffers中文教程）</a></div>
<div>
	&nbsp;</div>
<div>
	<a href="http://www.codelast.com/?p=299" rel="noopener noreferrer" target="_blank">Language Guide中文翻译（Google Protocol Buffers中文教程）</a></div>
<div>
	&nbsp;</div>
<div>
	<a href="http://www.codelast.com/?p=305" rel="noopener noreferrer" target="_blank">Style Guide中文翻译（Google Protocol Buffers中文教程）</a></div>
<div>
	&nbsp;</div>
<div>
	<a href="http://www.codelast.com/?p=316" rel="noopener noreferrer" target="_blank">Techniques 中文翻译（Google Protocol Buffers中文教程）</a></p>
<div>
<span id="more-8"></span>		<br />
		下面是我使用Google Protocol Buffers的一些总结：</p>
<p>		<a href="http://www.codelast.com/?p=8519" rel="noopener noreferrer" target="_blank">Protocol Buffers的Emacs语法高亮</a></div>
</div>
<p>
	&nbsp;</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<br />
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
	<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
	转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
	感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>[原创] Techniques 中文翻译（Google Protocol Buffers中文教程）</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9b-techniques-%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9b-techniques-%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/#comments</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 05:37:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[Buffer]]></category>
		<category><![CDATA[Google Protocol Buffers]]></category>
		<category><![CDATA[Protocol]]></category>
		<category><![CDATA[Protocol Buffer]]></category>
		<category><![CDATA[Protocol Buffers]]></category>
		<category><![CDATA[Techniques]]></category>
		<category><![CDATA[中文]]></category>
		<category><![CDATA[教程]]></category>
		<category><![CDATA[翻译]]></category>
		<guid isPermaLink="false">http://www.codelast.com/?p=316</guid>

					<description><![CDATA[<h1>
	<b><span lang="EN-US" style="font-size:20.5pt;font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;
color:black;mso-font-kerning:18.0pt">Techniques </span></b><b><span style="font-size:20.5pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:18.0pt">技巧</span></b></h1>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	<b><span lang="EN-US" style="font-size:
20.5pt;font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<h1>
	<span style="font-family:微软雅黑;"><span style="font-size:14px;">注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（<span style="color:#ff0000;">转载须注明出处</span>：本文来自learnhard的博客：<a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); " target="_blank" rel="noopener noreferrer"><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://www.codelast.com/</span></a>&#38;&#160;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</span></span></h1>
<p>
<span id="more-316"></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#streaming"><span style="color:#0000CC">Streaming Multiple Messages</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#large-data"><span style="color:#0000CC">Large Data Sets</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#union"><span style="color:#0000CC">Union Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#self-description"><span style="color:#0000CC">Self-describing Messages</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt">This page describes some commonly-used design patterns for dealing with Protocol Buffers. You can also send design and usage questions to the&#160;<a href="http://groups.google.com/group/protobuf"><span style="color:#0000CC">Protocol Buffers discussion group</span></a>.</span>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9b-techniques-%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/" class="read-more">Read More </a></p>]]></description>
										<content:encoded><![CDATA[<h1>
	<b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:18.0pt">Techniques </span></b><b><span style="font-size:20.5pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:18.0pt">技巧</span></b></h1>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	<b><span lang="EN-US" style="font-size:
20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<h1>
	<span style="font-family:微软雅黑;"><span style="font-size:14px;">注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（<span style="color:#ff0000;">转载须注明出处</span>：本文来自learnhard的博客：<a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); " target="_blank" rel="noopener noreferrer"><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://www.codelast.com/</span></a>&amp;&nbsp;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</span></span></h1>
<p>
<span id="more-316"></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#streaming"><span style="color:#0000CC">Streaming Multiple Messages</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#large-data"><span style="color:#0000CC">Large Data Sets</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#union"><span style="color:#0000CC">Union Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/techniques.html#self-description"><span style="color:#0000CC">Self-describing Messages</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This page describes some commonly-used design patterns for dealing with Protocol Buffers. You can also send design and usage questions to the&nbsp;<a href="http://groups.google.com/group/protobuf"><span style="color:#0000CC">Protocol Buffers discussion group</span></a>.<br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p> </o:p></span></p>
<h1>
	<span lang="EN-US" style="line-height: 15pt; text-align: left; text-indent: -21pt; font-size: 12pt; font-family: Wingdings; color: blue; ">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span><b style="line-height: 15pt; text-align: left; text-indent: -21pt; "><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">将多个消息转化为流</span></b></h1>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l0 level1 lfo2"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">大数据集</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l0 level1 lfo2"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">联合类型</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l0 level1 lfo2"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">自描述的消息</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">本文描述了处理</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的时候一些常用的设计模式。你也可以向</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">讨论组（</span></b><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://groups.google.com/group/protobuf"><span style="color:#0000CC">Protocol Buffers discussion group</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">）发送设计和使用方面的问题寻求解答。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Streaming Multiple Messages </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">将多个消息转化为流</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">If you want to write multiple messages to a single file or stream, it is up to you to keep track of where one message ends and the next begins. The Protocol Buffer wire format is not self-delimiting, so protocol buffer parsers cannot determine where a message ends on their own. The easiest way to solve this problem is to write the size of each message before you write the message itself. When you read the messages back in, you read the size, then read the bytes into a separate buffer, then parse from that buffer. (If you want to avoid copying bytes to a separate buffer, check out the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">CodedInputStream</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;class (in both C++ and Java) which can be told to limit reads to a certain number of bytes.)<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">如果你想将多个消息写入一个文件或流（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">stream</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">）中，那么是由你来记录一个消息的终点以及另一个消息的起点的。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Protocol Buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">数据传输格式不是自我限定的（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">self-delimiting</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">），所以</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">解析器无法自己决定一个消息结束于何处。解决这个问题的最简单的方法就是：在写入每一个消息之前，先写入消息的大小。当你读取消息的时候，先读取消息大小，然后将指定的字节数读入一个独立的缓冲区中，然后再解析缓冲区里的东西。如果你不想将数据拷贝到一个独立的缓冲区中，请查看</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">CodedInputStream</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">类（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">都可用）的使用方法&mdash;&mdash;你可以用它来限制只读取指定字节的数据。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Large Data Sets </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">大数据集</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Protocol Buffers are not designed to handle large messages. As a general rule of thumb, if you are dealing in messages larger than a megabyte each, it may be time to consider an alternate strategy.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">不是设计来处理大消息的。根据一般经验，如果你要处理的单条消息大于</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">1M</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">，那就是采取其他策略的时候了。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">That said, Protocol Buffers are great for handling individual messages&nbsp;<i>within</i>&nbsp;a large data set. Usually, large data sets are really just a collection of small pieces, where each small piece may be a structured piece of data. Even though Protocol Buffers cannot handle the entire set at once, using Protocol Buffers to encode each piece greatly simplifies your problem: now all you need is to handle a set of byte strings rather than a set of structures.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">也就是说，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">非常适合于处理一个大数据集内有多个单独的消息。通常，大数据集只是许多小块数据的集合，每一小块都是一块结构化的数据。即使是这样，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">也不能马上处理整个数据集，使用</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">来编码每一块数据可以极大地简化你的问题：现在你所需要的只是处理一组字符串，而不是一组结构体了。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Protocol Buffers do not include any built-in support for large data sets because different situations call for different solutions. Sometimes a simple list of records will do while other times you may want something more like a database. Each solution should be developed as a separate library, so that only those who need it need to pay the costs.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">没有内置任何对大数据集的支持，因为不同的情况需要不同的解决方案。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">有时，一个简单的记录列表就解决问题了，而在某些情况下，你可能更想要的是类似于数据库的东西。每个解决方案都应该作为一个独立的库来开发，所以只有需要它的人才需要付出代价。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Union Types </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">联合类型</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You may sometimes want to send a message that could be one of several different types. However, protocol buffer parsers cannot necessarily determine the type of a message based on the contents alone. So how do you make sure that the recipient application knows how to decode your message? One solution is to create a wrapper message that has one optional field for each possible message type.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">有时，你可能想发送一个消息，它的类型可以是几种不同的类型之一。然而，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">解析器无法仅凭消息内容来决定消息的类型。所以，你如何确保接收方应用程序能知道怎么解析消息呢？有一个解决方案是：创建一个封装的消息，其含有</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">N</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的字段，每一个字段对应一种可能的消息类型。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">For example, if you have message types&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Bar</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">, and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, you can combine them with a type like:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">例如，如果你有消息类型</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Bar</span><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">和</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，那么你可以将它们与类型结合起来，像这样：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message OneMessage {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// One of the following will be filled in.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Foo foo = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Bar bar = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Baz baz = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You may also want to have an enum field that identifies which message is filled in, so that you can&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">switch</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;on it:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">你也可能想这样做：添加一个枚举字段来标识是哪个消息被填充了，这样的话你就可以对它使用</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">switch</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">（来进行不同的处理）：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message OneMessage {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>enum Type { FOO = 1; BAR = 2; BAZ = 3; }<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// Identifies which field is filled in.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required Type type = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// One of the following will be filled in.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Foo foo = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Bar bar = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Baz baz = 4;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">If you have a very large number of possible types, listing every one of them in your container type may be unwieldy. Instead, you should consider using&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#extensions"><span style="color:#0000CC">extensions</span></a>:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">如果你有大量&ldquo;可能的类型&rdquo;，那么在你的容器类型中将它们一一列举出来可能非常困难。在这种情况下，你应该考虑使用扩展（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#extensions"><span style="color:#0000CC">extensions</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message OneMessage {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>extensions 100 to max;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">// Elsewhere...<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">extend OneMessage {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Foo foo_ext = 100;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Bar bar_ext = 101;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Baz baz_ext = 102;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Note that you can use the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">ListFields</span><span lang="EN-US" style="font-size:12.0pt;font-family:
&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;reflection method (in C++, Java, and Python) to get a list of all fields present in the message, including extensions. You might use this as part of a scheme for registering handlers for diverse message types.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">注意：你可以使用反射函数</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">ListFields</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Python</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">都可用）来获取一个消息中的所有字段的列表（包括扩展）。在实现一个为不同消息类型分别注册句柄的技术方案的时候，你可能用得上这个功能。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Self-describing Messages </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">自描述的消息</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Protocol Buffers do not contain descriptions of their own types. Thus, given only a raw message without the corresponding&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;file defining its type, it is difficult to extract any useful data.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">However, note that the contents of a .proto file can itself be represented using protocol buffers. The file&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">src/google/protobuf/descriptor.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">in the source code package defines the message types involved.&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">protoc</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;can output a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">FileDescriptorSet</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;&ndash; which represents a set of .proto files &ndash; using the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">--descriptor_set_out</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;option. With this, you could define a self-describing protocol message like so:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">不包含自我类型描述的信息。因此，如果只提供原始消息，而不提供对应的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件，你将很难从中提取出任何有用的数据。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">然而，请注意：一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件的内容可以使用</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">protocol buffers</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">来描述。通过使用</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">--descriptor_set_out</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">选项，源代码包中的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">src/google/protobuf/descriptor.proto</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件定义了相关的消息类型。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protoc</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">编译器可以输出一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">FileDescriptorSet</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">&mdash;&mdash;这个集合表示一系列的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件。利用它，你可以像这样定义一个自描述的协议消息：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SelfDescribingMessage {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// Set of .proto files which define the type.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span><span style="mso-spacerun:yes">&nbsp;</span>required FileDescriptorSet proto_files = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// Name of the message type.<span style="mso-spacerun:yes">&nbsp; </span>Must be defined by one of the files in<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// proto_files.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string type_name = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// The message data.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required bytes message_data = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">By using classes like&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">DynamicMessage</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;(available in C++ and Java), you can then write tools which can manipulate&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SelfDescribingMessage</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">s.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">All that said, the reason that this functionality is not included in the Protocol Buffer library is because we have never had a use for it inside Google.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">通过使用像</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">DynamicMessage</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">这样的类（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">都可用），你可以编写出操作</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SelfDescribingMessage</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的工具。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">总之，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Protocol Buffer</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">库之所以没有包含这个特性，是因为我们在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Google</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">还从没有需要用它的机会。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<br />
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
	<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
	转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
	感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9b-techniques-%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>[原创] Style Guide中文翻译（Google Protocol Buffers中文教程）</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9b-style-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9b-style-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/#respond</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 05:30:16 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[Buffer]]></category>
		<category><![CDATA[Google Protocol Buffers]]></category>
		<category><![CDATA[Protocol]]></category>
		<category><![CDATA[Protocol Buffer]]></category>
		<category><![CDATA[Protocol Buffers]]></category>
		<category><![CDATA[Style Guide]]></category>
		<category><![CDATA[中文]]></category>
		<category><![CDATA[教程]]></category>
		<category><![CDATA[翻译]]></category>
		<guid isPermaLink="false">http://www.codelast.com/?p=305</guid>

					<description><![CDATA[<h1>
	<b><span style="font-size:20.5pt;Helvetica&#34;,&#34;sans-serif&#34;;
color:black;">Style Guide </span></b><b><span style="font-size:20.5pt;color:blue;">风格指南</span></b></h1>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;">
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
		<span style="font-size:14px;"><span style="font-family:微软雅黑;"><font class="Apple-style-span" color="#000000">注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（</font><strong><span style="color:#ff0000;"><font class="Apple-style-span">转载须注明出处</font></span></strong><font class="Apple-style-span" color="#000000">：本文来自learnhard的博客：<a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); " target="_blank" rel="noopener noreferrer"><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://www.codelast.com/</span></a>&#38;&#160;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</font></span></span></div>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
<span id="more-305"></span>	</div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&#34;,&#34;sans-serif&#34;;color:black;">This document provides a style guide for&#160;</span><span style="font-size:10.0pt;Courier New&#34;;
color:#007000;">.proto</span><span style="font-size:12.0pt;Helvetica&#34;,&#34;sans-serif&#34;;color:black;">&#160;files. By following these conventions, you&#39;ll make your protocol buffer message definitions and their corresponding classes consistent and easy to read.</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">本文档提供了</span></b><b><span style="font-size:12.0pt;Helvetica&#34;,&#34;sans-serif&#34;;
color:blue;">.proto</span></b></font></div></div>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9b-style-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/" class="read-more">Read More </a>]]></description>
										<content:encoded><![CDATA[<h1>
	<b><span style="font-size:20.5pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">Style Guide </span></b><b><span style="font-size:20.5pt;color:blue;">风格指南</span></b></h1>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"></p>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
		<span style="font-size:14px;"><span style="font-family:微软雅黑;"><font class="Apple-style-span" color="#000000">注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（</font><strong><span style="color:#ff0000;"><font class="Apple-style-span">转载须注明出处</font></span></strong><font class="Apple-style-span" color="#000000">：本文来自learnhard的博客：<a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); " target="_blank" rel="noopener noreferrer"><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://www.codelast.com/</span></a>&amp;&nbsp;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</font></span></span></div>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
<span id="more-305"></span>	</div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">This document provides a style guide for&nbsp;</span><span style="font-size:10.0pt;Courier New&quot;;
color:#007000;">.proto</span><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">&nbsp;files. By following these conventions, you&#39;ll make your protocol buffer message definitions and their corresponding classes consistent and easy to read.</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">本文档提供了</span></b><b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;">.proto</span></b><b><span style="font-size:12.0pt;
color:blue;">文件的书写风格指南。通过遵守这些约定，你的</span></b><b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;">protocol buffer</span></b><b><span style="font-size:
12.0pt;color:blue;">消息定义和它们的对应类将会风格一致且易于阅读。</span></b></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		&nbsp;</div>
<div style="border:none;border-top:solid #3366CC 1.0pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<div align="left" style="margin-top:24.0pt;text-align:left;background:#E5ECF9;border:none;padding:0cm;">
			<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:15.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">Message And Field Names </span></b><b><span style="font-size:15.0pt;color:blue;">消息和字段名</span></b></font></div>
</p></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">Use CamelCase (with an initial capital) for message names &ndash; for example,&nbsp;</span><span style="font-size:10.0pt;Courier New&quot;;
color:#007000;">SongServerRequest</span><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">. Use underscore_separated_names for field names &ndash; for example,&nbsp;</span><span style="font-size:10.0pt;Courier New&quot;;color:#007000;">song_name</span><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">.</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">消息名使用驼峰格式（每个单词首字母大写）来书写&mdash;&mdash;例如</span></b><span style="font-size:10.0pt;Courier New&quot;;
color:#007000;">SongServerRequest</span><b><span style="font-size:12.0pt;color:blue;">。字段名使用小写的下划线分隔式（</span></b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">underscore_separated_names</span><b><span style="font-size:12.0pt;color:blue;">）来书写&mdash;&mdash;例如</span></b><span style="font-size:10.0pt;Courier New&quot;;
color:#007000;">song_name</span><b><span style="font-size:12.0pt;
color:blue;">。</span></b></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		&nbsp;</div>
<div style="border:solid #BBBBBB 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA">
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#007000;">message SongServerRequest {</span></font></div>
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#007000;">&nbsp;required string song_name = 1;</span></font></div>
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#007000;">}</span></font></div>
</p></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">Using this naming convention for field names gives you accessors like the following:</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">字段名使用这种形式的命名约定的话，生成的访问类中的函数就有如下形式：</span></b></font></div>
<div style="border:solid #BBBBBB 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA">
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:black;">C</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">++:</span><br />
			<span style="font-size:9.0pt;Courier New&quot;;
color:black;"> </span>&nbsp;<span style="font-size:9.0pt;Courier New&quot;;
color:#000088;">const</span><span style="font-size:
9.0pt;Courier New&quot;;color:#000088;">string</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">&amp;</span><span style="font-size:9.0pt;Courier New&quot;;color:black;"> song_name</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">()</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">{</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">...</span><span style="font-size:
9.0pt;Courier New&quot;;color:#666600;">}</span><br />
			<span style="font-size:9.0pt;Courier New&quot;;color:black;"> </span>&nbsp;<span style="font-size:9.0pt;Courier New&quot;;
color:#000088;">void</span><span style="font-size:9.0pt;Courier New&quot;;
color:black;"> set_song_name</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">(</span><span style="font-size:
9.0pt;Courier New&quot;;color:#000088;">const</span><span style="font-size:9.0pt;Courier New&quot;;color:#000088;">string</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">&amp;</span><span style="font-size:9.0pt;Courier New&quot;;
color:black;"> x</span><span style="font-size:
9.0pt;Courier New&quot;;color:#666600;">)</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">{</span><span style="font-size:
9.0pt;Courier New&quot;;color:#666600;">...</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">}</span></p>
<p>			<span style="font-size:9.0pt;Courier New&quot;;color:black;"> </span><span style="font-size:9.0pt;Courier New&quot;;color:black;">Java</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">:</span><br />
			<span style="font-size:
9.0pt;Courier New&quot;;color:black;"> </span>&nbsp;<span style="font-size:9.0pt;Courier New&quot;;
color:#000088;">public</span><span style="font-size:9.0pt;Courier New&quot;;
color:black;"> String getSongName</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">()</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">{</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">...</span><span style="font-size:
9.0pt;Courier New&quot;;color:#666600;">}</span><br />
			<span style="font-size:9.0pt;Courier New&quot;;color:black;"> </span>&nbsp;<span style="font-size:9.0pt;Courier New&quot;;
color:#000088;">public</span><span style="font-size:9.0pt;Courier New&quot;;
color:black;"> Builder setSongName</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">(</span><span style="font-size:
9.0pt;Courier New&quot;;color:black;">String v</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">)</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">{</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">...</span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">}</span></font></div>
</p></div>
<div style="border:none;border-top:solid #3366CC 1.0pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<div align="left" style="margin-top:24.0pt;text-align:left;background:#E5ECF9;border:none;padding:0cm;">
			<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:15.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">Enums </span></b><b><span style="font-size:
15.0pt;color:blue;">枚举</span></b></font></div>
</p></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">Use CamelCase (with an initial capital) for enum type names and CAPITALS_WITH_UNDERSCORES for value names:</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">枚举名使用驼峰格式（每个单词首字母大写）来书写，值名使用大写的下划线分隔式（</span></b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">CAPITALS_WITH_UNDERSCORES</span><b><span style="font-size:12.0pt;color:blue;">）来书写：</span></b></font></div>
<div style="border:solid #BBBBBB 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA">
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#000088;">enum</span><span style="font-size:9.0pt;Courier New&quot;;color:black;"> Foo </span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">{</span><br />
			<span style="font-size:9.0pt;Courier New&quot;;color:black;"> </span><span style="font-size:9.0pt;Courier New&quot;;color:black;">&nbsp; FIRST_VALUE </span><span style="font-size:9.0pt;Courier New&quot;;
color:#666600;">=</span><span style="font-size:9.0pt;Courier New&quot;;color:#006666;">1</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">;</span><br />
			<span style="font-size:9.0pt;Courier New&quot;;color:black;"> </span><span style="font-size:9.0pt;Courier New&quot;;color:black;">&nbsp; SECOND_VALUE </span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">=</span><span style="font-size:
9.0pt;Courier New&quot;;color:#006666;">2</span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">;</span><br />
			<span style="font-size:9.0pt;Courier New&quot;;
color:black;"> </span><span style="font-size:9.0pt;Courier New&quot;;color:#666600;">}</span></font></div>
</p></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">Each enum value should end with a semicolon, not a comma.</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">每一个枚举值都应该以分号结尾，而不是逗号。</span></b></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></div>
<div style="border:none;border-top:solid #3366CC 1.0pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<div align="left" style="margin-top:24.0pt;text-align:left;background:#E5ECF9;border:none;padding:0cm;">
			<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:15.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">Services </span></b><b><span style="font-size:15.0pt;color:blue;">服务</span></b></font></div>
</p></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;color:black;">If your&nbsp;</span><span style="font-size:10.0pt;Courier New&quot;;color:#007000;">.proto</span><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;">&nbsp;defines an RPC service, you should use CamelCase (with an initial capital) for both the service name and any RPC method names:</span></font></div>
<div align="left" style="text-align:left;line-height:15.0pt;">
		<font class="Apple-style-span" color="#000000" size="7"><b><span style="font-size:12.0pt;color:blue;">如果你的</span></b><b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;">.proto</span></b><b><span style="font-size:12.0pt;
color:blue;">文件定义了一个</span></b><b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;">RPC</span></b><b><span style="font-size:12.0pt;
color:blue;">服务，那么服务名和任何</span></b><b><span style="font-size:12.0pt;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;">RPC</span></b><b><span style="font-size:12.0pt;
color:blue;">函数名都应该使用驼峰格式（每个单词首字母大写）来书写：</span></b></font></div>
<div style="border:solid #BBBBBB 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA">
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#007000;">service FooService {</span></font></div>
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#007000;">&nbsp;rpc GetSomething(FooRequest) returns (FooResponse);</span></font></div>
<div align="left" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;
background:#FAFAFA;border:none;padding:0cm;"><br />
			<font class="Apple-style-span" color="#000000" size="7"><span style="font-size:
9.0pt;Courier New&quot;;color:#007000;">}</span></font></div>
</p></div>
</div>
<div align="left" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;"><br />
	<br />
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
	<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
	转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
	感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
		<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9b-style-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[原创] Language Guide中文翻译（Google Protocol Buffers中文教程）</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9b-language-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9b-language-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/#respond</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Tue, 14 Sep 2010 05:22:37 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[Buffer]]></category>
		<category><![CDATA[Google Protocol Buffers]]></category>
		<category><![CDATA[Language Guide]]></category>
		<category><![CDATA[Protocol]]></category>
		<category><![CDATA[Protocol Buffer]]></category>
		<category><![CDATA[Protocol Buffers]]></category>
		<category><![CDATA[中文]]></category>
		<category><![CDATA[教程]]></category>
		<category><![CDATA[翻译]]></category>
		<guid isPermaLink="false">http://www.codelast.com/?p=299</guid>

					<description><![CDATA[<h1>
	<b><span lang="EN-US" style="font-size:20.5pt;font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;
color:black;mso-font-kerning:18.0pt">Language Guide </span></b><b><span style="font-size:20.5pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:18.0pt">语言指南</span></b></h1>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（<strong><span style="color:#ff0000;">转载须注明出处</span></strong>：本文来自learnhard的博客：<span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(0, 0, 255); "><a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); border-style: initial; border-color: initial; border-style: initial; border-color: initial; " target="_blank" rel="noopener noreferrer">http://www.codelast.com/</a>&#160;</span>&#38;&#160;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); border-style: initial; border-color: initial; border-style: initial; border-color: initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</p>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
<span id="more-299"></span></p>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	<b><span lang="EN-US" style="font-size:
20.5pt;font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#simple"><span style="color:#0000CC">Defining A Message Type</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#scalar"><span style="color:#0000CC">Scalar Value Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#optional"><span style="color:#0000CC">Optional And Default Values</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#enum"><span style="color:#0000CC">Enumerations</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#other"><span style="color:#0000CC">Using Other Message Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#nested"><span style="color:#0000CC">Nested Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#updating"><span style="color:#0000CC">Updating A Message Type</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#extensions"><span style="color:#0000CC">Extensions</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#packages"><span style="color:#0000CC">Packages</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#services"><span style="color:#0000CC">Defining Services</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#options"><span style="color:#0000CC">Options</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&#183;<span style="font:7.0pt &#34;Times New Roman&#34;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#generating"><span style="color:#0000CC">Generating Your Classes</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&#34;Helvetica&#34;,&#34;sans-serif&#34;;color:black;mso-font-kerning:0pt">This guide describes how to use the protocol buffer language to structure your protocol buffer data, including&#160;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&#34;Courier New&#34;;color:#007000;
mso-font-kerning:0pt">.proto</span>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9b-language-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/" class="read-more">Read More </a></p>]]></description>
										<content:encoded><![CDATA[<h1>
	<b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:18.0pt">Language Guide </span></b><b><span style="font-size:20.5pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:18.0pt">语言指南</span></b></h1>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	注：这是本人的翻译，可能不准确，可能有错误，但是基本上可以理解，希望能对大家有所帮助！（<strong><span style="color:#ff0000;">转载须注明出处</span></strong>：本文来自learnhard的博客：<span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(0, 0, 255); "><a href="http://www.codelast.com/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); border-style: initial; border-color: initial; border-style: initial; border-color: initial; " target="_blank" rel="noopener noreferrer">http://www.codelast.com/</a>&nbsp;</span>&amp;&nbsp;<a href="http://blog.csdn.net/learnhard/" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-decoration: none; color: rgb(0, 77, 153); border-style: initial; border-color: initial; border-style: initial; border-color: initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(0, 0, 255); ">http://blog.csdn.net/learnhard/</span></a>）</p>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
<span id="more-299"></span></p>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	<b><span lang="EN-US" style="font-size:
20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#simple"><span style="color:#0000CC">Defining A Message Type</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#scalar"><span style="color:#0000CC">Scalar Value Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#optional"><span style="color:#0000CC">Optional And Default Values</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#enum"><span style="color:#0000CC">Enumerations</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#other"><span style="color:#0000CC">Using Other Message Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#nested"><span style="color:#0000CC">Nested Types</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#updating"><span style="color:#0000CC">Updating A Message Type</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#extensions"><span style="color:#0000CC">Extensions</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#packages"><span style="color:#0000CC">Packages</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#services"><span style="color:#0000CC">Defining Services</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#options"><span style="color:#0000CC">Options</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l13 level1 lfo1;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#generating"><span style="color:#0000CC">Generating Your Classes</span></a><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This guide describes how to use the protocol buffer language to structure your protocol buffer data, including&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;file syntax and how to generate data access classes from your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;files.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This is a reference guide &ndash; for a step by step example that uses many of the features described in this document, see the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/tutorials.html"><span style="color:#0000CC">tutorial</span></a>&nbsp;for your chosen language.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span><span lang="EN-US" style="line-height: 26.25pt; text-indent: -21pt; font-size: 12pt; font-family: Wingdings; color: blue; ">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span><b style="line-height: 26.25pt; text-indent: -21pt; "><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">定义一个消息（</span></b><b style="line-height: 26.25pt; text-indent: -21pt; "><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="line-height: 26.25pt; text-indent: -21pt; "><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）类型</span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">标量值类型</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">可选的（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）字段以及默认值</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">枚举</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">使用其他消息类型</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">嵌套类型</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">更新一个消息类型</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">扩展</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">包（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">package</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">定义服务（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">service</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">选项（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">option</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:-21.0pt;line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:
1;mso-list:l0 level1 lfo8"><br />
	<span lang="EN-US" style="font-size:12.0pt;mso-bidi-font-size:20.5pt;font-family:Wingdings;
mso-fareast-font-family:Wingdings;mso-bidi-font-family:Wingdings;color:blue;
mso-font-kerning:18.0pt;mso-bidi-font-weight:bold"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">生成访问类</span></b><b><span lang="EN-US" style="font-size:20.5pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;
mso-font-kerning:18.0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">本指南描述了怎样使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">语言来构造你的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">数据，包括</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件语法以及怎样生成</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件的数据访问类。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-left:-7.5pt;text-align:left;
line-height:26.25pt;mso-pagination:widow-orphan;mso-outline-level:1"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">本文是一个参考指南&mdash;&mdash;如果要查看如何使用本文中描述的多个特性的循序渐进的例子，请在</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/tutorials.html"><span style="color:#0000CC">tutorial</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">中查找你需要的语言的教程。</span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Defining A Message Type </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">定义一个消息类型</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">First let&#39;s look at a very simple example. Let&#39;s say you want to define a search request message format, where each search request has a query string, the particular page of results you are interested in, and a number of results per page. Here&#39;s the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;file you use to define the message type.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">首先看一个非常简单的例子。假设你想定义一个&ldquo;搜索请求&rdquo;（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">search request</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">）的消息格式，每一个搜索请求含有一个查询字符串、你感兴趣的查询结果所在的页数，以及每一页多少条查询结果。那么下面这个就是用来定义消息类型的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件了：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchRequest {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string query = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 page_number = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 result_per_page = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchRequest</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;message definition specifies three fields (name/value pairs), one for each piece of data that you want to include in this type of message. Each field has a name and a type.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">SearchRequest</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">消息类型指定了</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">3</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">个字段（名</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">/</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">值</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"> </span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">对），你想在消息中承载的数据分别对应于每一个字段。每个字段都有一个名字（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">name</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）和一个类型（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">type</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）。</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b><span lang="EN-US" style="font-size: 15pt; font-family: Helvetica, sans-serif; ">Specifying Field Types </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">指定字段类型</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">In the above example, all the fields are&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#scalar"><span style="color:#0000CC">scalar types</span></a>: two integers (</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">page_number</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;and&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">result_per_page</span><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">) and a string (</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">query</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">). However, you can also specify composite types for your fields, including&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#enum"><span style="color:#0000CC">enumerations</span></a>&nbsp;and other message types.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">在上面的例子中，所有字段都是标量类型（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#scalar"><span style="color:#0000CC">scalar types</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">:</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">两个整型（</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">page_number</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">和</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">result_per_page</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">），一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">string</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">（</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">query</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">）。然而，你也可以为字段指定合成的类型，包括枚举（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#enum"><span style="color:#0000CC">enumerations</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）以及其他消息类型。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Assigning Tags </span></b><b><span style="font-size:15.0pt;
font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">分配标识号</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">As you can see, each field in the message definition has a&nbsp;<b>unique numbered tag</b>. These tags are used to identify your fields in the&nbsp;<a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">message binary format</span></a>, and should not be changed once your message type is in use. Note that tags with values in the range 1 through 15 take one byte to encode. Tags in the range 16 through 2047 take two bytes. So you should reserve the tags 1 through 15 for very frequently occurring message elements. Remember to leave some room for frequently occurring elements that might be added in the future.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The smallest tag number you can specify is 1, and the largest is 2<sup>29</sup>&nbsp;- 1, or 536,870,911. You also cannot use the numbers 19000 though 19999 (</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">FieldDescriptor::kFirstReservedNumber</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;through&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">FieldDescriptor::kLastReservedNumber</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">), as they are reserved for the Protocol Buffers implementation - the protocol buffer compiler will complain if you use one of these reserved numbers in your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">如你所见，在消息定义中，每一个字段都有一个</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#FF0066;mso-font-kerning:0pt">独一无二的标识号</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">（</span></b><b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">unique numbered tag</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）。这些标识号是用来在</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#FF0066;mso-font-kerning:0pt">消息二进制格式</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">（</span></b><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">message binary format</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）中识别你的字段的。注意：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">[1,15]</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">之内的标识号在编码的时候会占用一个字节。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">[16,2047]</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">之内的标识号则占用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">2</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">个字节。所以你应该为那些频繁出现的消息元素保留</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">[1,15]</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">之内的标识号。切记：要为将来有可能添加的、频繁出现的标识号预留一些标识号。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Specifying Field Rules </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">指定字段规则</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You specify that message fields are one of the following:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l4 level1 lfo2;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">required</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: a well-formed message must have exactly one of this field.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l4 level1 lfo2;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">optional</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: a well-formed message can have zero or one of this field (but not more than one).<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l4 level1 lfo2;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">repeated</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">: this field can be repeated any number of times (including zero) in a well-formed message. The order of the repeated values will be preserved.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">你所指定的消息字段必须是如下之一：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo10"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">：一个格式良好的消息一定要含有</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">1</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">个这种字段。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo10"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">：一个格式良好的消息可以有</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">0</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">个或</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">1</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">个这种字段（但不超过</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">1</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">个）。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:21.0pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l1 level1 lfo10"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:blue;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">：在一个格式良好的消息中，这种字段可以重复任意多次（包括</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">0</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">次）。重复的值的顺序会被保留。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">（译者注：这一段内容我不太理解，因为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Google</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">提供的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">示例文件并没有按这个说法来编写</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">&hellip;</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">）</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">For historical reasons,&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">repeated</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;fields of basic numeric types aren&#39;t encoded as efficiently as they could be. New code should use the special option&nbsp;</span><span lang="EN-US" style="line-height: 15pt; font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 112, 0); ">[packed=true]</span><span lang="EN-US" style="line-height: 15pt; font-size: 12pt; font-family: Helvetica, sans-serif; ">&nbsp;to get a more efficient encoding. For example:</span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">由于历史原因，基本数值类型的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的字段并没有被尽可能地高效编码。在新的代码（译者注：这里是指</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件的内容）中，用户应该使用特殊选项</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">[packed=true]</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">来保证更高效的编码。例如：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">repeated int32 samples = 4 [packed=true];<o:p></o:p></span></p>
</div>
<div style="mso-element:para-border-div;border-top:solid #FFCC33 1.0pt;
border-left:none;border-bottom:solid #FFCC33 1.0pt;border-right:none;
mso-border-top-alt:solid #FFCC33 .75pt;mso-border-bottom-alt:solid #FFCC33 .75pt;
padding:2.0pt 0cm 2.0pt 0cm;background:#EFEFEF"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan;background:#EFEFEF;border:none;
mso-border-top-alt:solid #FFCC33 .75pt;mso-border-bottom-alt:solid #FFCC33 .75pt;
padding:0cm;mso-padding-alt:2.0pt 0cm 2.0pt 0cm"><br />
		<b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Required Is Forever</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;You should be very careful about marking fields as&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">required</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">. If at some point you wish to stop writing or sending a required field, it will be problematic to change the field to an optional field &ndash; old readers will consider messages without this field to be incomplete and may reject or drop them unintentionally. You should consider writing application-specific custom validation routines for your buffers instead. Some engineers at Google have come to the conclusion that using&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">required</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;does more harm than good; they prefer to use only</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">optional</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;and&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">repeated</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">. However, this view is not universal.<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">是永久性的：在把一个字段标识为</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的时候，你应该特别小心。如果在某些情况下你不想写入或者发送一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的字段，那么将该字段更改为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">可能会遇到问题&mdash;&mdash;旧版本的读者（译者注：即读取、解析消息的一方）会认为不含该字段的消息（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">message</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">）是不完整的，从而有可能会拒绝解析。在这种情况下，你应该考虑编写特别针对于应用程序的、自定义的消息校验函数。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">Google</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的一些工程师得出了一个结论：使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">弊多于利；他们更愿意使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">而不是</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">。当然，这个观点并不具有普遍性。</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span>&nbsp;</b><b><span lang="EN-US" style="font-size: 15pt; font-family: Helvetica, sans-serif; ">Adding More Message Types </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">添加更多消息类型</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Multiple message types can be defined in a single&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;file. This is useful if you are defining multiple related messages &ndash; so, for example, if you wanted to define the reply message format that corresponds to your&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">SearchResponse</span><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;message type, you could add it to the same&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">在一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">文件中可以定义多个消息类型。在定义多个相关的消息的时候，这一点特别有用&mdash;&mdash;例如，如果你想定义与你的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">消息类型对应的回复消息格式的话，你可以将它添加到相同的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件中：</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchRequest {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string query = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 page_number = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 result_per_page = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchResponse {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span>...<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Adding Comments </span></b><b><span style="font-size:
15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">添加注释</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">To add comments to your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;files, use C/C++-style&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">//</span><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;syntax.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">向</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件添加注释，可以使用</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">C/C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">风格的双斜杠（</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">//</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">语法格式。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchRequest {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string query = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 page_number = 2;// Which page number do we want?<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 result_per_page = 3;// Number of results to return per page.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">What&#39;s Generated From Your</span></b><b><span lang="EN-US" style="font-size:15.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;</span></b><b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">? </span></b><b><span style="font-size:15.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">从你的</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b><span style="font-size:
15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">文件生成了什么？</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">When you run the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#generating"><span style="color:#0000CC">protocol buffer compiler</span></a>&nbsp;on a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, the compiler generates the code in your chosen language you&#39;ll need to work with the message types you&#39;ve described in the file, including getting and setting field values, serializing your messages to an output stream, and parsing your messages from an input stream.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">当你对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件运行</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">编译器（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#generating"><span style="color:#0000CC">protocol buffer compiler</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">）的时候，编译器生成你所选择的语言的代码，这些代码可以操作你在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件中定义的消息类型，包括获取、设置字段值，将你的消息序列化到一个输出流中，以及从一个输入流中解析你的消息。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">For&nbsp;<b>C++</b>, the compiler generates a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.h</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.cc</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;file from each&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, with a class for each message type described in your file.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">For&nbsp;<b>Java</b>, the compiler generates a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.java</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;file with a class for each message type, as well as a special&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Builder</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;classes for creating message class instances.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">来说，编译器为每一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件生成了一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.h</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件和一个</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.cc</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件，</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件中的每一个消息有一个对应的类。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">来说，编译器为每一个消息类型生成了一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.java</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件，以及一个特殊的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Builder</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">类（这个类是用来创建消息类接口的）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Python</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;is a little different &ndash; the Python compiler generates a module with a static descriptor of each message type in your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">, which is then used with a&nbsp;<i>metaclass</i>&nbsp;to create the necessary Python data access class at runtime.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can find out more about using the APIs for each language by following the tutorial for your chosen language. For even more API details, see the relevant&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/overview.html"><span style="color:#0000CC">API reference</span></a>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Python</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">来说，有点不一样&mdash;&mdash;</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Python</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">编译器为</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件中的每个消息类型生成一个模型，其含有一个静态描述符（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">static descriptor</span><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:black;
mso-font-kerning:0pt">，</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">译者注：没用过</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Python</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，不清楚这样翻译正确与否），该模型与一个元类（</span></b><i><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">metaclass</span></i><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）在运行时（</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">runtime</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）被用来创建必需的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Python</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">数据访问类。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">你可以从每种语言的教程中找到更多使用使用</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">API</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的方法。如欲查看更详细的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">API</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">信息，请阅相关的文章</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/overview.html"><span style="color:#0000CC">API reference</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">。</span></b><span style="font-family: Helvetica, sans-serif; font-size: 12pt; line-height: 15pt; ">&nbsp;</span></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Scalar Value Types </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">标量数值类型</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">A scalar message field can have one of the following types &ndash; the table shows the type specified in the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;file, and the corresponding type in the automatically generated class:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">一个标量消息字段可以含有一个如下的类型&mdash;&mdash;该表格展示了定义于</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件中的类型，以及与之对应的、在自动生成的访问类中定义的类型：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="width:97.02%;margin-left:9.0pt;border-collapse:collapse;border:none;
 mso-border-alt:solid #BBBBBB .75pt;mso-yfti-tbllook:1184" width="97%"></p>
<tbody>
<tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  mso-border-alt:solid #BBBBBB .75pt;background:#E5ECF9;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">.proto Type<o:p></o:p></span></b></p>
</td>
<td style="width:70.08%;border:solid #BBBBBB 1.0pt;
  border-left:none;mso-border-left-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:#E5ECF9;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Notes<o:p></o:p></span></b></p>
</td>
<td style="width:10.2%;border:solid #BBBBBB 1.0pt;
  border-left:none;mso-border-left-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:#E5ECF9;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">C++ Type<o:p></o:p></span></b></p>
</td>
<td style="width:11.22%;border:solid #BBBBBB 1.0pt;
  border-left:none;mso-border-left-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:#E5ECF9;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Java Type<o:p></o:p></span></b></p>
</td>
</tr>
<tr style="mso-yfti-irow:1">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">double<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"><br />
				&nbsp;</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">double<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">double<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:2">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">float<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"><br />
				&nbsp;</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">float<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">float<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:3">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int32<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Uses variable-length encoding. Inefficient for encoding negative numbers &ndash; if your field is likely to have negative values, use sint32 instead.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
  mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
  mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
  mso-font-kerning:0pt">使用可变长编码方式。编码负数时不够高效&mdash;&mdash;如果你的字段可能含有负数，那么请使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
  font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">sint32</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
  宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
  mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int32<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:4">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int64<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Uses variable-length encoding. Inefficient for encoding negative numbers &ndash; if your field is likely to have negative values, use sint64 instead.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">使用可变长编码方式。编码负数时不够高效&mdash;&mdash;如果你的字段可能含有负数，那么请使用</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
  font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">sint64</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
  宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
  mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int64<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">long<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:5">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">uint32<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Uses variable-length encoding.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">使用可变长编码方式。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">uint32<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int<sup>[1]</sup><o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:6">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">uint64<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Uses variable-length encoding.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">使用可变长编码方式。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">uint64<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">long<sup>[1]</sup><o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:7">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">sint32<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">使用可变长编码方式。有符号的整型值。编码时比通常的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
  font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">int32</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
  宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
  mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">高效。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int32<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:8">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">sint64<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">使用可变长编码方式。有符号的整型值。编码时比通常的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
  font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">int64</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
  宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
  mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">高效。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int64<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">long<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:9">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">fixed32<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Always four bytes. More efficient than uint32 if values are often greater than 2<sup>28</sup>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">总是</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">4</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">个字节。如果数值总是比总是比</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt">2<sup>28</sup></span><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">大的话，这个类型会比</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">uint32</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">高效。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">uint32<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int<sup>[1]</sup><o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:10">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">fixed64<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Always eight bytes. More efficient than uint64 if values are often greater than 2<sup>56</sup>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">总是</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">8</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">个字节。如果数值总是比总是比</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt">2<sup>56</sup></span><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">大的话，这个类型会比</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">uint64</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">高效。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">uint64<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">long<sup>[1]</sup><o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:11">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">sfixed32<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Always four bytes.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">总是</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">4</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">个字节。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int32<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:12">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">sfixed64<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">Always eight bytes.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">总是</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">8</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">个字节。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">int64<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">long<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:13">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">bool<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"><br />
				&nbsp;</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">bool<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">boolean<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:14">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">string<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">A string must always contain UTF-8 encoded or 7-bit ASCII text.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">一个字符串必须是</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">UTF-8</span></b><b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
  Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
  color:#3333FF;mso-font-kerning:0pt">编码或者</span></b><b style="mso-bidi-font-weight:
  normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
  color:#3333FF;mso-font-kerning:0pt">7-bit ASCII</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
  宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
  mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">编码的文本。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;
  mso-font-kerning:0pt"><o:p></o:p></span></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">string<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">String<o:p></o:p></span></p>
</td>
</tr>
<tr style="mso-yfti-irow:15;mso-yfti-lastrow:yes">
<td style="width:8.48%;border:solid #BBBBBB 1.0pt;
  border-top:none;mso-border-top-alt:solid #BBBBBB .75pt;mso-border-alt:solid #BBBBBB .75pt;
  background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="8%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">bytes<o:p></o:p></span></p>
</td>
<td style="width:70.08%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="70%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">May contain any arbitrary sequence of bytes.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<b style="mso-bidi-font-weight:
  normal"><span style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:
  宋体;color:#3333FF;mso-font-kerning:0pt">可能包含任意顺序的字节数据。<span lang="EN-US"><o:p></o:p></span></span></b></p>
</td>
<td style="width:10.2%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="10%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">string<o:p></o:p></span></p>
</td>
<td style="width:11.22%;border-top:none;border-left:
  none;border-bottom:solid #BBBBBB 1.0pt;border-right:solid #BBBBBB 1.0pt;
  mso-border-top-alt:solid #BBBBBB .75pt;mso-border-left-alt:solid #BBBBBB .75pt;
  mso-border-alt:solid #BBBBBB .75pt;background:white;padding:4.5pt 9.0pt 4.5pt 9.0pt" valign="top" width="11%"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
  line-height:15.0pt;mso-pagination:widow-orphan"><br />
					<span lang="EN-US" style="font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;mso-font-kerning:
  0pt">ByteString<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can find out more about how these types are encoded when you serialize your message in&nbsp;<a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">Protocol Buffer Encoding</span></a>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<sup><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">[1]</span></sup><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;In Java, unsigned 32-bit and 64-bit integers are represented using their signed counterparts, with the top bit simply being stored in the sign bit.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">你可以在文章</span></b><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">Protocol Buffer Encoding</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">中，找到更多&ldquo;序列化消息时各种类型如何编码&rdquo;的信息。</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<sup><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">[1]</span></sup><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">在</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">中，无符号</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">32</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">位和</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">64</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">位整型以它们对应的有符号类型来表示。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Optional Fields And Default Values </span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Optional</span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">的字段和默认值</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">As mentioned above, elements in a message description can be labeled&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">optional</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. A well-formed message may or may not contain an optional element. When a message is parsed, if it does not contain an optional element, the corresponding field in the parsed object is set to the default value for that field. The default value can be specified as part of the message description. For example, let&#39;s say you want to provide a default value of 10 for a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">SearchRequest</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&#39;s&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">result_per_page</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;value.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">如上所述，消息描述中的一个元素可以被标记为&ldquo;可选的&rdquo;（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">）。一个格式良好的消息可以包含一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">的元素，也可以不包含。当解析一个消息的时候，如果它不包含</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">的元素，那么解析出来的对象中的对应字段就被置为默认值。默认值可以在消息描述文件中指定。例如，要为</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchRequest</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">result_per_page</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">字段指定默认值</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">10</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，可以这样做：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">optional int32 result_per_page = 3 [default = 10];<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">If the default value is not specified for an optional element, a type-specific default value is used instead: for strings, the default value is the empty string. For bools, the default value is false. For numeric types, the default value is zero. For enums, the default value is the first value listed in the enum&#39;s type definition.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">如果没有为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的元素指定默认值，</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">那么就会使用与特定类型相关的默认值：对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">string</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">来说，默认值是空字符串。对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">bool</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">来说，默认值是</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">false</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">。对数值类型来说，默认值是</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">0</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">。对枚举来说，默认值是枚举类型定义中的第一个值。</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Enumerations </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">枚举</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">When you&#39;re defining a message type, you might want one of its fields to only have one of a pre-defined list of values. For example, let&#39;s say you want to add a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">corpus</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;field for each&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchRequest</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, where the corpus can be&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">UNIVERSAL</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">WEB</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">IMAGES</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">LOCAL</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">NEWS</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">PRODUCTS</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;or&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">VIDEO</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. You can do this very simply by adding an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;to your message definition - a field with an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;type can only have one of a specified set of constants as its value (if you try to provide a different value, the parser will treat it like an unknown field). In the following example we&#39;ve added an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;called&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Corpus</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">with all the possible values, and a field of type&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Corpus</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">当你定义一个消息类型的时候，你可能想为一个字段指定某&ldquo;预定义值序列&rdquo;（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">pre-defined list of values</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">）中的一个值。例如，假设你想为每一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchRequest</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息添加一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">corpus</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">字段，而</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">corpus</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的值可能是</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">UNIVERSAL</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">WEB</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">IMAGES</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">LOCAL</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">NEWS</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">PRODUCTS</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">或</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">VIDEO</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">中的一个。你可以很容易地实现这一点：通过向你的消息定义中添加一个枚举（</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）就可以了。一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">类型的字段只能用指定的常量集（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">specified set of constants</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）中的一个值作为其值（如果你尝试指定不同的值，解析器就会把它当作一个未知的字段来对待）。在下面的例子中，我们已经添加了一个叫做</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Corpus</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的枚举（</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）&mdash;&mdash;它含有所有可能的值&mdash;&mdash;以及一个类型为</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Corpus</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的字段：</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchRequest {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string query = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 page_number = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 result_per_page = 3 [default = 10];<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>enum Corpus {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>UNIVERSAL = 0;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>WEB = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>IMAGES = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>LOCAL = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>NEWS = 4;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>PRODUCTS = 5;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>VIDEO = 6;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Corpus corpus = 4 [default = UNIVERSAL];<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Enumerator constants must be in the range of a 32-bit integer. Since&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;values use varint encoding on the wire, negative values are inefficient and thus not recommended. You can define&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">s within a message definition, as in the above example, or outside &ndash; these&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">s can be reused in any message definition in your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;file. You can also use an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;type declared in one message as the type of a field in a different message, using the syntax&nbsp;</span><i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">MessageType</span></i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.<i>EnumType</i></span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">When you run the protocol buffer compiler on a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;that uses an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, the generated code will have a corresponding&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;for Java or C++, or a special&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">EnumDescriptor</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;class for Python that&#39;s used to create a set of symbolic constants with integer values in the runtime-generated class.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">For more information about how to work with message&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">s in your applications, see the&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/overview.html"><span style="color:#0000CC">generated code guide</span></a>&nbsp;for your chosen language.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">枚举常量必须在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">32</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">位整型值的范围内。因为</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">值是使用可变编码方式的，对负数不够高效，因此不推荐在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">enum</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">中使用负数。如上例所示，你可以在一个消息定义的内部或外部定义枚举&mdash;&mdash;这些枚举可以在你的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件中的任何消息定义里重用。你也可以在一个消息中声明一个枚举类型，而在另一个不同的消息中使用它&mdash;&mdash;采用</span></b><i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">MessageType</span></i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.<i>EnumType</i></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的语法格式。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">当你对一个使用了枚举的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">文件运行</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">protocol buffer</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">编译器的时候，生成的代码中将有一个对应的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">enum</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">（对</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">Java</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">或</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">来说），或者一个特殊的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">EnumDescriptor</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">类（对</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Python</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">来说），它被用来在运行时生成的类中创建一系列的整型值符号常量（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">symbolic constants</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">关于如何在你的应用程序的消息中使用枚举的更多信息，请查看你所选择的语言的</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/reference/overview.html"><span style="color:#0000CC">generated code guide</span></a></span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Using Other Message Types </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">使用其他消息类型</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can use other message types as field types. For example, let&#39;s say you wanted to include&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;messages in each&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">message &ndash; to do this, you can define a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;message type in the same&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;and then specify a field of type&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;in&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">SearchResponse</span><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">你可以将其他消息类型用作字段类型。例如，假设你想在每一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息中包含</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息，你可以这样做&mdash;&mdash;在相同的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件中定义一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息类型，然后在</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息中指定一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">类型的字段：</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchResponse {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>repeated Result result = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message Result {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>required string url = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional string title = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>repeated string snippets = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Importing Definitions </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">导入定义</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">In the above example, the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;message type is defined in the same file as&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">SearchResponse</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;&ndash; what if the message type you want to use as a field type is already defined in another&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;file?<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">在上面的例子中，</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">消息类型与</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">SearchResponse</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">是定义在同一文件中的&mdash;&mdash;如果你要使用的消息类型已经在其他</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件中已经定义过了呢？</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can use definitions from other&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;files by&nbsp;<i>importing</i>&nbsp;them. To import another&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&#39;s definitions, you add an import statement to the top of your file:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">你可以通过导入（</span></b><i><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">importing</span></i><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">）其他</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件中的定义来使用它们。要导入其他</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件的定义，你需要在你的文件中添加一个导入声明：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">import &quot;myproject/other_protos.proto&quot;;<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">The protocol compiler searches for imported files in a set of directories specified on the protocol compiler command line using the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">-I</span><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">/</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">--import_path</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;flag. If no flag was given, it looks in the directory in which the compiler was invoked.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">然后，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">protocol</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">编译器就会在一系列目录中查找需要被导入的文件，这些目录通过</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">protocol</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">编译器的命令行参数</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">-I</span><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">/</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">--import_path</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">指定。如果不提供参数，编译器就在其调用目录下查找。</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Nested Types </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">嵌套类型</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can define and use message types inside other message types, as in the following example &ndash; here the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;message is defined inside the </span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;message:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">你可以在其他消息类型中定义、使用消息类型，在下面的例子中，</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息就定义在</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">消息内：</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchResponse {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>message Result {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>required string url = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>optional string title = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>repeated string snippets = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>repeated Result result = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">If you want to reuse this message type outside its parent message type, you refer to it as&nbsp;</span><i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Parent</span></i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.<i>Type</i></span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">如果你想在它的父消息类型的外部重用这个消息类型，你需要以</span></b><i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Parent</span></i><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.<i>Type</i></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的形式使用它：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SomeOtherMessage {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional SearchResponse.Result result = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can nest messages as deeply as you like:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">你可以将消息嵌套任意多层：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message Outer {<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>// Level 0<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>message MiddleAA {<span style="mso-spacerun:yes">&nbsp; </span>// Level 1<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>message Inner {<span style="mso-spacerun:yes">&nbsp;&nbsp; </span>// Level 2<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>required int64 ival = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>optional bool<span style="mso-spacerun:yes">&nbsp; </span>booly = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>message MiddleBB {<span style="mso-spacerun:yes">&nbsp; </span>// Level 1<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>message Inner {<span style="mso-spacerun:yes">&nbsp;&nbsp; </span>// Level 2<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>required int32 ival = 1;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>optional bool<span style="mso-spacerun:yes">&nbsp; </span>booly = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Groups </span></b><b><span style="font-size:15.0pt;
font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">组</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Note that this feature is deprecated and should not be used when creating new message types &ndash; use nested message types instead.<o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:red;
mso-font-kerning:0pt">注意：这个特性已经被弃用了，在创建新的消息类型的时候，不应该再使用它&mdash;&mdash;你应该使用嵌套消息类型来代替它。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:red;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Groups are another way to nest information in your message definitions. For example, another way to specify a&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">SearchResponse</span><span lang="EN-US" style="font-size:12.0pt;font-family:
&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;containing a number of&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">s is as follows:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">&ldquo;组&rdquo;是在你的消息定义中嵌套信息的另一种方法。例如，在</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">中包含若干</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的另一种方法是</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"> </span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message SearchResponse {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>repeated group Result = 1 {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>required string url = 2;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>optional string title = 3;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>repeated string snippets = 4;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">A group simply combines a nested message type and a field into a single declaration. In your code, you can treat this message just as if it had a</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;type field called&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">result</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;(the latter name is converted to lower-case so that it does not conflict with the former). Therefore, this example is exactly equivalent to the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">SearchResponse</span><span lang="EN-US" style="font-size:12.0pt;font-family:
&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;above, except that the message has a different&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">wire format</span></a>.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">一个&ldquo;组&rdquo;只是简单地将一个嵌套消息类型和一个字段捆绑到一个单独的声明中。在你的代码中，你可以把它看成是含有一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">类型、名叫</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">result</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的字段的消息（后面的名字被转换成了小写，所以它不会与前面的冲突）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">因此，除了数据传输格式（</span></b><span lang="EN-US" style="font-size:
12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/encoding.html"><span style="color:#0000CC">wire format</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">）不同之外，这个例子与上面的</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">SearchResponse</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">例子是完全等价的。</span></b><span style="font-family: Helvetica, sans-serif; font-size: 12pt; line-height: 15pt; ">&nbsp;</span></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Updating A Message Type </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">更新一个消息类型</span></b><b><span lang="EN-US" style="font-size:
15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">If an existing message type no longer meets all your needs &ndash; for example, you&#39;d like the message format to have an extra field &ndash; but you&#39;d still like to use code created with the old format, don&#39;t worry! It&#39;s very simple to update message types without breaking any of your existing code. Just remember the following rules:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">如果一个已有的消息无法再满足你的需求&mdash;&mdash;例如，你想在消息中添加一个额外的字段&mdash;&mdash;但是你同时还想让为旧版本写的代码仍然可用，不用怕！更新消息而不破坏已有代码是非常简单的。只要你记住下面的规则：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Don&#39;t change the numeric tags for any existing fields.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Any new fields that you add should be&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">optional</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;or&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">repeated</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. This means that any messages serialized by code using your &quot;old&quot; message format can be parsed by your new generated code, as they won&#39;t be missing any&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">required</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;elements. You should set up sensible&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#optional"><span style="color:#0000CC">default values</span></a>&nbsp;for these elements so that new code can properly interact with messages generated by old code. Similarly, messages created by your new code can be parsed by your old code: old binaries simply ignore the new field when parsing. However, the unknown fields are not discarded, and if the message is later serialized, the unknown fields are serialized along with it &ndash; so if the message is passed on to new code, the new fields are still available. Note that preservation of unknown fields is currently not available for Python.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Non-required fields can be removed, as long as the tag number is not used again in your updated message type (it may be better to rename the field instead, perhaps adding the prefix &quot;OBSOLETE_&quot;, so that future users of your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;can&#39;t accidentally reuse the number).<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">A non-required field can be converted to an&nbsp;<a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#extensions"><span style="color:#0000CC">extension</span></a>&nbsp;and vice versa, as long as the type and number stay the same.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">int32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">uint32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">int64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">uint64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">bool</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;are all compatible &ndash; this means you can change a field from one of these types to another without breaking forwards- or backwards-compatibility. If a number is parsed from the wire which doesn&#39;t fit in the corresponding type, you will get the same effect as if you had cast the number to that type in C++ (e.g. if a 64-bit number is read as an int32, it will be truncated to 32 bits).<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">sint32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">sint64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;are compatible with each other but are&nbsp;<i>not</i>&nbsp;compatible with the other integer types.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">string</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bytes</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;are compatible as long as the bytes are valid UTF-8.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Embedded messages are compatible with&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">bytes</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;if the bytes contain an encoded version of the message.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:29.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-18.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l8 level1 lfo3;tab-stops:list 36.0pt"><br />
	<span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Symbol;
mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;color:black;
mso-font-kerning:0pt"><span style="mso-list:Ignore">&middot;<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">fixed32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;is compatible with&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">sfixed32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, and&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">fixed64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;with&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">sfixed64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">不要更改任何已有的字段的数值标识（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">tag</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">）。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">你添加的任何字段都必须是</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">optional</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">或</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">repeated</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的。这就意味着任何使用你的&ldquo;旧&rdquo;消息格式的代码序列化的消息可以被你的新代码所解析，因为它们不会丢掉任何</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">的元素。你应该为这些元素设置合理的默认值（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#optional"><span style="color:#0000CC">default values</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">），这样新的代码就能够正确地与老代码生成的消息交互了。类似地，你的新代码创建的消息也能被你的老代码解析：老的二进制程序在解析的时候只是简单地将新字段忽略。然而，未知的字段是没有被抛弃的，此后，如果消息被序列化，未知的字段会随之一起被序列化&mdash;&mdash;所以，如果消息传到了新代码那里，则新的字段仍然可用。注意：对</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">Python</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">来说，对未知字段的保留策略是无效的。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">非</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的字段可以移除&mdash;&mdash;只要它们的标识号（</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">tag number</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">）在你的新消息类型中不再使用（更好的做法可能是重命名那个字段，例如在字段前添加&ldquo;</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">OBSOLETE_</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">&rdquo;前缀，那样的话，你的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">文件的用户将来就不会无意中重新使用了那些不该使用的标识号）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">一个非</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">required</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">的字段可以转换为一个扩展（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><a href="http://code.google.com/intl/zh-CN/apis/protocolbuffers/docs/proto.html#extensions"><span style="color:#0000CC">extension</span></a></span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">），反之亦然&mdash;&mdash;只要它的类型和标识号保持不变。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">int32</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">uint32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">int64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">uint64</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">和</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">bool</span><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">是全部兼容的，这意味着你可以将这些类型中的一个转换为另外一个，而不会破坏前向、后向的兼容性。如果解析出来的数字与对应的类型不相符，那么结果就像在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">中对它进行了强制类型转换一样（例如，如果把一个</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">64</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">位数字当作</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">int32</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">来读取，那么它就会被截断为</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt">32</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#3333FF;mso-font-kerning:0pt">位的数字）。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">sint32</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">和</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">sint64</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">是互相兼容的，但是它们与其他整数类型</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:red;mso-font-kerning:0pt">不兼容</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">string</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">和</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">bytes</span><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;mso-font-kerning:0pt">是兼容的&mdash;&mdash;只要</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bytes</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">是有效的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">UTF-8</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">编码。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">嵌套消息与</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bytes</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">是兼容的&mdash;&mdash;只要</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt">bytes</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#3333FF;mso-font-kerning:0pt">包含该消息的一个编码过的版本。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;margin-right:0cm;
margin-bottom:0cm;margin-left:32.25pt;margin-bottom:.0001pt;text-align:left;
text-indent:-21.0pt;line-height:15.0pt;mso-pagination:widow-orphan;mso-list:
l12 level1 lfo11"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:Wingdings;mso-fareast-font-family:Wingdings;mso-bidi-font-family:
Wingdings;color:#3333FF;mso-font-kerning:0pt"><span style="mso-list:Ignore">l<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:#3333FF;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;</span></span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">fixed32</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">与</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">sfixed32</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">是兼容的，</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">fixed64</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">与</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">sfixed64</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:#3333FF;
mso-font-kerning:0pt">是兼容的。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#3333FF;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:3.6pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #3366CC 1.0pt;
mso-border-top-alt:solid #3366CC .75pt;padding:1.0pt 0cm 0cm 0cm;background:
#E5ECF9;margin-left:-7.5pt;margin-right:0cm"></p>
<p align="left" class="MsoNormal" style="margin-top:24.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:2;background:#E5ECF9;border:none;
mso-border-top-alt:solid #3366CC .75pt;padding:0cm;mso-padding-alt:1.0pt 0cm 0cm 0cm"><br />
		<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">Extensions </span></b><b><span style="font-size:15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">扩展</span></b><b><span lang="EN-US" style="font-size:15.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Extensions let you declare that a range of field numbers in a message are available for third-party extensions. Other people can then declare new fields for your message type with those numeric tags in their own&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;files without having to edit the original file. Let&#39;s look at an example:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">通过扩展，你可以将一个范围内的字段标识号声明为可被第三方扩展所用。然后，其他人就可以在他们自己的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件中为你的消息类型声明新的字段，而不必去编辑原始文件了。让我们看个例子：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message Foo {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>// ...<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>extensions 100 to 199;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This says that the range of field numbers [100, 199] in&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;is reserved for extensions. Other users can now add new fields to&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;in their own</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;files that import your&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">.proto</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, using tags within your specified range &ndash; for example:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">这个例子表明：在消息</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">中，范围</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">[100,199]</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">之内的字段标识号被保留为扩展用。现在，其他人就可以在他们自己的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">.proto</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">文件中添加新字段到</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">里了，但是添加的字段标识号要在指定的范围内&mdash;&mdash;例如：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">extend Foo {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional int32 bar = 126;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">This says that&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;now has an optional&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">int32</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;field called&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bar</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">When your user&#39;s&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;messages are encoded, the wire format is exactly the same as if the user defined the new field inside&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. However, the way you access extension fields in your application code is slightly different to accessing regular fields &ndash; your generated data access code has special accessors for working with extensions. So, for example, here&#39;s how you set the value of&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bar</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;in C++:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">这个例子表明：消息</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">现在有一个名为</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">bar</span><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">的</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">optional</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt"> int32</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">字段。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">当用户的</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Foo</span><b style="mso-bidi-font-weight:normal"><span style="font-size:
12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">消息被编码的时候，数据的传输格式与用户在</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">里定义新字段的效果是完全一样的。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">然而，你在程序代码中访问扩展字段的方法与访问普通的字段稍有不同&mdash;&mdash;你生成的数据访问代码为扩展准备了特殊的访问函数来访问它。例如，下面是你如何在</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">中设置</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bar</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的值：</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt"><o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:black;
mso-font-kerning:0pt">Foo foo</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#666600;mso-font-kerning:
0pt">;</span><br />
		<span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;color:black;mso-font-kerning:0pt">foo</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#666600;mso-font-kerning:0pt">.</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:black;
mso-font-kerning:0pt">SetExtension</span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#666600;
mso-font-kerning:0pt">(</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:black;mso-font-kerning:
0pt">bar</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;color:#666600;mso-font-kerning:0pt">,</span><span lang="EN-US" style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:black;mso-font-kerning:0pt"> </span><span lang="EN-US" style="font-size:
9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#006666;
mso-font-kerning:0pt">15</span><span lang="EN-US" style="font-size:9.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#666600;mso-font-kerning:
0pt">);</span><span lang="EN-US" style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt"><o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Similarly, the&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">&nbsp;class defines templated accessors&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">HasExtension()</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">ClearExtension()</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">GetExtension()</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">,&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">MutableExtension()</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">, and</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">AddExtension()</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. All have semantics matching the corresponding generated accessors for a normal field. For more information about working with extensions, see the generated code reference for your chosen language.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">Note that extensions can be of any field type, including message types.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">类似地，</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">Foo</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">类也定义了模板函数</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">HasExtension()</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">ClearExtension()</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">GetExtension()</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">，</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">MutableExtension()</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">，以及</span></b><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">AddExtension()</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">。这些函数的语义都与对应的普通字段的访问函数相符。要查看更多使用扩展的信息，请参考相应语言的代码生成指南。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">注意：扩展可以是任何字段类型，包括消息类型。</span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span style="color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); ">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255); ">http://www.codelast.com/</span></a></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="margin-top:18.0pt;text-align:left;
mso-pagination:widow-orphan;mso-outline-level:3"><br />
	<b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">Nested Extensions </span></b><b><span style="font-size:
15.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:
Helvetica;mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">嵌套的扩展</span></b><b><span lang="EN-US" style="font-size:15.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">You can declare extensions in the scope of another type:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">你可以在另一个类型的范围内声明扩展：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message Baz {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>extend Foo {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>optional int32 bar = 126;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>...<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">In this case, the C++ code to access this extension is:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">在此例中，访问此扩展的</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt">C++</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">代码是：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">Foo foo;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">foo.SetExtension(Baz::bar, 15);<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">In other words, the only effect is that&nbsp;</span><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">bar</span><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">&nbsp;is defined within the scope of&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:
0pt">Baz</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:black;mso-font-kerning:0pt">.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">换句话说，唯一的效果就是</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;color:blue;mso-font-kerning:0pt">bar</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">被定义在</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;color:blue;mso-font-kerning:0pt">Baz</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:blue;mso-font-kerning:0pt">的范围内。</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border-top:solid #AA0033 1.0pt;
border-left:none;border-bottom:solid #AA0033 1.0pt;border-right:none;
mso-border-top-alt:solid #AA0033 .75pt;mso-border-bottom-alt:solid #AA0033 .75pt;
padding:2.0pt 0cm 2.0pt 0cm;background:#EFEFEF"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan;background:#EFEFEF;border:none;
mso-border-top-alt:solid #AA0033 .75pt;mso-border-bottom-alt:solid #AA0033 .75pt;
padding:0cm;mso-padding-alt:2.0pt 0cm 2.0pt 0cm"><br />
		<span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">This is a common source of confusion: Declaring an&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">extend</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;block nested inside a message type&nbsp;</span><b><i><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#AA0033;mso-font-kerning:0pt">does not</span></i></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;imply any relationship between the outer type and the extended type. In particular, the above example&nbsp;</span><b><i><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:#AA0033;mso-font-kerning:0pt">does not</span></i></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;mean that&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;is any sort of subclass of&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">. All it means is that the symbol&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bar</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;is declared inside the scope of&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">; it&#39;s simply a static member.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:15.0pt;mso-pagination:widow-orphan;background:#EFEFEF;border:none;
mso-border-top-alt:solid #AA0033 .75pt;mso-border-bottom-alt:solid #AA0033 .75pt;
padding:0cm;mso-padding-alt:2.0pt 0cm 2.0pt 0cm"><br />
		<b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">这是个引起混淆的来源：在一个消息类型中嵌套声明一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">extend</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">块并</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:#C00000;mso-font-kerning:0pt">没有</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">暗示外部类型（</span></b><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">outer type</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">）与扩展类型（</span></b><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">extended type</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;
font-family:宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;
mso-bidi-font-family:Helvetica;color:blue;mso-font-kerning:0pt">）之间有任何联系。特别地，上面的例子</span></b><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:
宋体;mso-ascii-font-family:Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:
Helvetica;color:#C00000;mso-font-kerning:0pt">没有</span></b><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">表明</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">是</span></b><span lang="EN-US" style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;color:#007000;
mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">的任何类型的子类。它所表明的仅仅是：符号</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">bar</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">是在</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的内部声明的；它只是一个静态成员罢了。</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">A common pattern is to define extensions inside the scope of the extension&#39;s field type &ndash; for example, here&#39;s an extension to&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">&nbsp;of type&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">, where the extension is defined as part of&nbsp;</span><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;
mso-font-kerning:0pt">:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">一个通常的设计模式就是：在扩展的字段类型的范围内定义该扩展&mdash;&mdash;例如，下面是一个</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Foo</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的扩展（该扩展是</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">类型的），其中，扩展被定义为了</span></b><span lang="EN-US" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
color:#007000;mso-font-kerning:0pt">Baz</span><b style="mso-bidi-font-weight:
normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
Helvetica;mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;
color:blue;mso-font-kerning:0pt">的一部分：</span></b><b style="mso-bidi-font-weight:
normal"><span lang="EN-US" style="font-size:12.0pt;font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;
color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">（译者注：这样的定义形式确很容易引起混淆，请继续往下看，以帮助你消除这种混淆）</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message Baz {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>extend Foo {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp; </span>optional Baz foo_ext = 127;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>...<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">However, there is no requirement that an extension with a message type be defined inside that type. You can also do this:<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">然而，并没有强制要求一个消息类型的扩展一定要定义在那个消息中。你也可以这样做：</span></b><b style="mso-bidi-font-weight:normal"><span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:blue;mso-font-kerning:0pt"><o:p></o:p></span></b></p>
<div style="mso-element:para-border-div;border:solid #BBBBBB 1.0pt;mso-border-alt:
solid #BBBBBB .75pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#FAFAFA"></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">message Baz {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>...<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><o:p>&nbsp;</o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">// This can even be in a different file.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">extend Foo {<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt"><span style="mso-spacerun:yes">&nbsp; </span>optional Baz foo_baz_ext = 127;<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="margin-top:12.0pt;text-align:left;
line-height:12.75pt;mso-pagination:widow-orphan;tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;
background:#FAFAFA;border:none;mso-border-alt:solid #BBBBBB .75pt;padding:0cm;
mso-padding-alt:12.0pt 12.0pt 12.0pt 12.0pt"><br />
		<span lang="EN-US" style="font-size:
9.0pt;font-family:&quot;Courier New&quot;;color:#007000;mso-font-kerning:0pt">}<o:p></o:p></span></p>
</div>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<span lang="EN-US" style="font-size:12.0pt;
font-family:&quot;Helvetica&quot;,&quot;sans-serif&quot;;color:black;mso-font-kerning:0pt">In fact, this syntax may be preferred to avoid confusion. As mentioned above, the nested syntax is often mistaken for subclassing by users who are not already familiar with extensions.<o:p></o:p></span></p>
<p align="left" class="MsoNormal" style="text-align:left;line-height:15.0pt;
mso-pagination:widow-orphan"><br />
	<b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体;mso-ascii-font-family:Helvetica;
mso-hansi-font-family:Helvetica;mso-bidi-font-family:Helvetica;color:blue;
mso-font-kerning:0pt">事实上，这种语法格式更能防止引起混淆。正如上面所提到的，嵌套的语法通常被错误地认为有子类化的关系&mdash;&mdash;尤其是对那些还不熟悉扩展的用户来说。</span></b></p>
<p style="text-align: left;">
	&nbsp;</p>
<p></p>
<h2>
	&nbsp;</h2>
<p><span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9b-language-guide%e4%b8%ad%e6%96%87%e7%bf%bb%e8%af%91%ef%bc%88google-protocol-buffers%e4%b8%ad%e6%96%87%e6%95%99%e7%a8%8b%ef%bc%89/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
