| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=9"/><meta name="generator" content="Doxygen 1.8.6"/><title>GRPC Core: include/grpc/compression.h File Reference</title><link href="tabs.css" rel="stylesheet" type="text/css"/><script type="text/javascript" src="jquery.js"></script><script type="text/javascript" src="dynsections.js"></script><link href="search/search.css" rel="stylesheet" type="text/css"/><script type="text/javascript" src="search/search.js"></script><script type="text/javascript">  $(document).ready(function() { searchBox.OnSelectItem(0); });</script><link href="doxygen.css" rel="stylesheet" type="text/css" /></head><body><div id="top"><!-- do not remove this div, it is closed by doxygen! --><div id="titlearea"><table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;">  <td style="padding-left: 0.5em;">   <div id="projectname">GRPC Core    <span id="projectnumber">4.0.0</span>   </div>  </td> </tr> </tbody></table></div><!-- end header part --><!-- Generated by Doxygen 1.8.6 --><script type="text/javascript">var searchBox = new SearchBox("searchBox", "search",false,'Search');</script>  <div id="navrow1" class="tabs">    <ul class="tablist">      <li><a href="index.html"><span>Main Page</span></a></li>      <li><a href="pages.html"><span>Related Pages</span></a></li>      <li><a href="modules.html"><span>Modules</span></a></li>      <li><a href="annotated.html"><span>Data Structures</span></a></li>      <li class="current"><a href="files.html"><span>Files</span></a></li>      <li>        <div id="MSearchBox" class="MSearchBoxInactive">        <span class="left">          <img id="MSearchSelect" src="search/mag_sel.png"               onmouseover="return searchBox.OnSearchSelectShow()"               onmouseout="return searchBox.OnSearchSelectHide()"               alt=""/>          <input type="text" id="MSearchField" value="Search" accesskey="S"               onfocus="searchBox.OnSearchFieldFocus(true)"                onblur="searchBox.OnSearchFieldFocus(false)"                onkeyup="searchBox.OnSearchFieldChange(event)"/>          </span><span class="right">            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>          </span>        </div>      </li>    </ul>  </div>  <div id="navrow2" class="tabs2">    <ul class="tablist">      <li><a href="files.html"><span>File List</span></a></li>      <li><a href="globals.html"><span>Globals</span></a></li>    </ul>  </div><!-- window showing the filter options --><div id="MSearchSelectWindow"     onmouseover="return searchBox.OnSearchSelectShow()"     onmouseout="return searchBox.OnSearchSelectHide()"     onkeydown="return searchBox.OnSearchSelectKey(event)"><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Pages</a></div><!-- iframe showing the search results (closed by default) --><div id="MSearchResultsWindow"><iframe src="javascript:void(0)" frameborder="0"         name="MSearchResults" id="MSearchResults"></iframe></div><div id="nav-path" class="navpath">  <ul><li class="navelem"><a class="el" href="dir_bda73758a0a4d8c0ff603a7983866e1c.html">include</a></li><li class="navelem"><a class="el" href="dir_8ae8e534eeef321a81935092729b7078.html">grpc</a></li>  </ul></div></div><!-- top --><div class="header">  <div class="summary"><a href="#func-members">Functions</a>  </div>  <div class="headertitle"><div class="title">compression.h File Reference</div>  </div></div><!--header--><div class="contents"><div class="textblock"><code>#include <<a class="el" href="impl_2codegen_2port__platform_8h_source.html">grpc/impl/codegen/port_platform.h</a>></code><br/><code>#include <stdlib.h></code><br/><code>#include <<a class="el" href="compression__types_8h_source.html">grpc/impl/codegen/compression_types.h</a>></code><br/><code>#include <<a class="el" href="slice_8h_source.html">grpc/slice.h</a>></code><br/></div><p><a href="compression_8h_source.html">Go to the source code of this file.</a></p><table class="memberdecls"><tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>Functions</h2></td></tr><tr class="memitem:a5054ebec22cc256853a7ac2ed61fd654"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="compression_8h.html#a5054ebec22cc256853a7ac2ed61fd654">grpc_compression_algorithm_parse</a> (<a class="el" href="structgrpc__slice.html">grpc_slice</a> value, <a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> *algorithm)</td></tr><tr class="memdesc:a5054ebec22cc256853a7ac2ed61fd654"><td class="mdescLeft"> </td><td class="mdescRight">Parses the first <em>name_length</em> bytes of <em>name</em> as a grpc_compression_algorithm instance, updating <em>algorithm</em>.  <a href="#a5054ebec22cc256853a7ac2ed61fd654">More...</a><br/></td></tr><tr class="separator:a5054ebec22cc256853a7ac2ed61fd654"><td class="memSeparator" colspan="2"> </td></tr><tr class="memitem:a03ef1c76766826058d841d7f4e1213f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="compression_8h.html#a03ef1c76766826058d841d7f4e1213f0">grpc_compression_algorithm_name</a> (<a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> algorithm, char **name)</td></tr><tr class="memdesc:a03ef1c76766826058d841d7f4e1213f0"><td class="mdescLeft"> </td><td class="mdescRight">Updates <em>name</em> with the encoding name corresponding to a valid <em>algorithm</em>.  <a href="#a03ef1c76766826058d841d7f4e1213f0">More...</a><br/></td></tr><tr class="separator:a03ef1c76766826058d841d7f4e1213f0"><td class="memSeparator" colspan="2"> </td></tr><tr class="memitem:adc2d1d89d880f67aacc4ce84cd72f8f3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="compression_8h.html#adc2d1d89d880f67aacc4ce84cd72f8f3">grpc_compression_algorithm_for_level</a> (<a class="el" href="compression__types_8h.html#a14a79ed6b5ebd7e1dda7c2684f499cc7">grpc_compression_level</a> level, uint32_t accepted_encodings)</td></tr><tr class="memdesc:adc2d1d89d880f67aacc4ce84cd72f8f3"><td class="mdescLeft"> </td><td class="mdescRight">Returns the compression algorithm corresponding to <em>level</em> for the compression algorithms encoded in the <em>accepted_encodings</em> bitset.  <a href="#adc2d1d89d880f67aacc4ce84cd72f8f3">More...</a><br/></td></tr><tr class="separator:adc2d1d89d880f67aacc4ce84cd72f8f3"><td class="memSeparator" colspan="2"> </td></tr><tr class="memitem:a2eccdbe5a4d811a7c965d6d67e5cc7d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> void </td><td class="memItemRight" valign="bottom"><a class="el" href="compression_8h.html#a2eccdbe5a4d811a7c965d6d67e5cc7d8">grpc_compression_options_init</a> (<a class="el" href="structgrpc__compression__options.html">grpc_compression_options</a> *opts)</td></tr><tr class="separator:a2eccdbe5a4d811a7c965d6d67e5cc7d8"><td class="memSeparator" colspan="2"> </td></tr><tr class="memitem:a79e61d1ac1d226b3b54b73837f28f0ff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> void </td><td class="memItemRight" valign="bottom"><a class="el" href="compression_8h.html#a79e61d1ac1d226b3b54b73837f28f0ff">grpc_compression_options_enable_algorithm</a> (<a class="el" href="structgrpc__compression__options.html">grpc_compression_options</a> *opts, <a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> algorithm)</td></tr><tr class="memdesc:a79e61d1ac1d226b3b54b73837f28f0ff"><td class="mdescLeft"> </td><td class="mdescRight">Mark <em>algorithm</em> as enabled in <em>opts</em>.  <a href="#a79e61d1ac1d226b3b54b73837f28f0ff">More...</a><br/></td></tr><tr class="separator:a79e61d1ac1d226b3b54b73837f28f0ff"><td class="memSeparator" colspan="2"> </td></tr><tr class="memitem:a1b58d314775a3651ee2f5f2d3ab4f6d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> void </td><td class="memItemRight" valign="bottom"><a class="el" href="compression_8h.html#a1b58d314775a3651ee2f5f2d3ab4f6d9">grpc_compression_options_disable_algorithm</a> (<a class="el" href="structgrpc__compression__options.html">grpc_compression_options</a> *opts, <a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> algorithm)</td></tr><tr class="memdesc:a1b58d314775a3651ee2f5f2d3ab4f6d9"><td class="mdescLeft"> </td><td class="mdescRight">Mark <em>algorithm</em> as disabled in <em>opts</em>.  <a href="#a1b58d314775a3651ee2f5f2d3ab4f6d9">More...</a><br/></td></tr><tr class="separator:a1b58d314775a3651ee2f5f2d3ab4f6d9"><td class="memSeparator" colspan="2"> </td></tr><tr class="memitem:aba0dfe631311c3f49d1045694bc9b0df"><td class="memItemLeft" align="right" valign="top"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="compression_8h.html#aba0dfe631311c3f49d1045694bc9b0df">grpc_compression_options_is_algorithm_enabled</a> (const <a class="el" href="structgrpc__compression__options.html">grpc_compression_options</a> *opts, <a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> algorithm)</td></tr><tr class="memdesc:aba0dfe631311c3f49d1045694bc9b0df"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if <em>algorithm</em> is marked as enabled in <em>opts</em>.  <a href="#aba0dfe631311c3f49d1045694bc9b0df">More...</a><br/></td></tr><tr class="separator:aba0dfe631311c3f49d1045694bc9b0df"><td class="memSeparator" colspan="2"> </td></tr></table><h2 class="groupheader">Function Documentation</h2><a class="anchor" id="adc2d1d89d880f67aacc4ce84cd72f8f3"></a><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> grpc_compression_algorithm_for_level </td>          <td>(</td>          <td class="paramtype"><a class="el" href="compression__types_8h.html#a14a79ed6b5ebd7e1dda7c2684f499cc7">grpc_compression_level</a> </td>          <td class="paramname"><em>level</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">uint32_t </td>          <td class="paramname"><em>accepted_encodings</em> </td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td>        </tr>      </table></div><div class="memdoc"><p>Returns the compression algorithm corresponding to <em>level</em> for the compression algorithms encoded in the <em>accepted_encodings</em> bitset. </p><p>It abort()s for unknown levels . </p></div></div><a class="anchor" id="a03ef1c76766826058d841d7f4e1213f0"></a><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> int grpc_compression_algorithm_name </td>          <td>(</td>          <td class="paramtype"><a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> </td>          <td class="paramname"><em>algorithm</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">char ** </td>          <td class="paramname"><em>name</em> </td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td>        </tr>      </table></div><div class="memdoc"><p>Updates <em>name</em> with the encoding name corresponding to a valid <em>algorithm</em>. </p><p>Note that <em>name</em> is statically allocated and must <em>not</em> be freed. Returns 1 upon success, 0 otherwise. </p></div></div><a class="anchor" id="a5054ebec22cc256853a7ac2ed61fd654"></a><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> int grpc_compression_algorithm_parse </td>          <td>(</td>          <td class="paramtype"><a class="el" href="structgrpc__slice.html">grpc_slice</a> </td>          <td class="paramname"><em>value</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> * </td>          <td class="paramname"><em>algorithm</em> </td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td>        </tr>      </table></div><div class="memdoc"><p>Parses the first <em>name_length</em> bytes of <em>name</em> as a grpc_compression_algorithm instance, updating <em>algorithm</em>. </p><p>Returns 1 upon success, 0 otherwise. </p></div></div><a class="anchor" id="a1b58d314775a3651ee2f5f2d3ab4f6d9"></a><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> void grpc_compression_options_disable_algorithm </td>          <td>(</td>          <td class="paramtype"><a class="el" href="structgrpc__compression__options.html">grpc_compression_options</a> * </td>          <td class="paramname"><em>opts</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> </td>          <td class="paramname"><em>algorithm</em> </td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td>        </tr>      </table></div><div class="memdoc"><p>Mark <em>algorithm</em> as disabled in <em>opts</em>. </p></div></div><a class="anchor" id="a79e61d1ac1d226b3b54b73837f28f0ff"></a><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> void grpc_compression_options_enable_algorithm </td>          <td>(</td>          <td class="paramtype"><a class="el" href="structgrpc__compression__options.html">grpc_compression_options</a> * </td>          <td class="paramname"><em>opts</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> </td>          <td class="paramname"><em>algorithm</em> </td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td>        </tr>      </table></div><div class="memdoc"><p>Mark <em>algorithm</em> as enabled in <em>opts</em>. </p></div></div><a class="anchor" id="a2eccdbe5a4d811a7c965d6d67e5cc7d8"></a><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> void grpc_compression_options_init </td>          <td>(</td>          <td class="paramtype"><a class="el" href="structgrpc__compression__options.html">grpc_compression_options</a> * </td>          <td class="paramname"><em>opts</em></td><td>)</td>          <td></td>        </tr>      </table></div><div class="memdoc"></div></div><a class="anchor" id="aba0dfe631311c3f49d1045694bc9b0df"></a><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname"><a class="el" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> int grpc_compression_options_is_algorithm_enabled </td>          <td>(</td>          <td class="paramtype">const <a class="el" href="structgrpc__compression__options.html">grpc_compression_options</a> * </td>          <td class="paramname"><em>opts</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype"><a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> </td>          <td class="paramname"><em>algorithm</em> </td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td>        </tr>      </table></div><div class="memdoc"><p>Returns true if <em>algorithm</em> is marked as enabled in <em>opts</em>. </p></div></div></div><!-- contents --><!-- start footer part --><hr class="footer"/><address class="footer"><small>Generated on Wed Jun 21 2017 14:13:07 for GRPC Core by  <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6</small></address></body></html>
 |