| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357 | <!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.13"/><meta name="viewport" content="width=device-width, initial-scale=1"/><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/searchdata.js"></script><script type="text/javascript" src="search/search.js"></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 id="projectalign" style="padding-left: 0.5em;">   <div id="projectname">GRPC Core    <span id="projectnumber">6.0.0-dev</span>   </div>  </td> </tr> </tbody></table></div><!-- end header part --><!-- Generated by Doxygen 1.8.13 --><script type="text/javascript">var searchBox = new SearchBox("searchBox", "search",false,'Search');</script><script type="text/javascript" src="menudata.js"></script><script type="text/javascript" src="menu.js"></script><script type="text/javascript">$(function() {  initMenu('',true,false,'search.php','Search');  $(document).ready(function() { init_search(); });});</script><div id="main-nav"></div><!-- window showing the filter options --><div id="MSearchSelectWindow"     onmouseover="return searchBox.OnSearchSelectShow()"     onmouseout="return searchBox.OnSearchSelectHide()"     onkeydown="return searchBox.OnSearchSelectKey(event)"></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_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_9d7a14d6d9adcbe4c35dbdb88d867e2e.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:af41160f827a3ff132755fb25658435c4"><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#af41160f827a3ff132755fb25658435c4">grpc_compression_algorithm_is_message</a> (<a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> algorithm)</td></tr><tr class="memdesc:af41160f827a3ff132755fb25658435c4"><td class="mdescLeft"> </td><td class="mdescRight">Return if an algorithm is message compression algorithm.  <a href="#af41160f827a3ff132755fb25658435c4">More...</a><br /></td></tr><tr class="separator:af41160f827a3ff132755fb25658435c4"><td class="memSeparator" colspan="2"> </td></tr><tr class="memitem:a053257ed8bdeba196b380f326897e25d"><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#a053257ed8bdeba196b380f326897e25d">grpc_compression_algorithm_is_stream</a> (<a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> algorithm)</td></tr><tr class="memdesc:a053257ed8bdeba196b380f326897e25d"><td class="mdescLeft"> </td><td class="mdescRight">Return if an algorithm is stream compression algorithm.  <a href="#a053257ed8bdeba196b380f326897e25d">More...</a><br /></td></tr><tr class="separator:a053257ed8bdeba196b380f326897e25d"><td class="memSeparator" colspan="2"> </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 <em>slice</em> as a grpc_compression_algorithm instance and 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:a177f6d6330355d5ecaffb042ab1c2c8f"><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#a177f6d6330355d5ecaffb042ab1c2c8f">grpc_compression_algorithm_name</a> (<a class="el" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> algorithm, const char **name)</td></tr><tr class="memdesc:a177f6d6330355d5ecaffb042ab1c2c8f"><td class="mdescLeft"> </td><td class="mdescRight">Updates <em>name</em> with the encoding name corresponding to a valid <em>algorithm</em>.  <a href="#a177f6d6330355d5ecaffb042ab1c2c8f">More...</a><br /></td></tr><tr class="separator:a177f6d6330355d5ecaffb042ab1c2c8f"><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 id="adc2d1d89d880f67aacc4ce84cd72f8f3"></a><h2 class="memtitle"><span class="permalink"><a href="#adc2d1d89d880f67aacc4ce84cd72f8f3">◆ </a></span>grpc_compression_algorithm_for_level()</h2><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></div></div><a id="af41160f827a3ff132755fb25658435c4"></a><h2 class="memtitle"><span class="permalink"><a href="#af41160f827a3ff132755fb25658435c4">◆ </a></span>grpc_compression_algorithm_is_message()</h2><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_is_message </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><td>)</td>          <td></td>        </tr>      </table></div><div class="memdoc"><p>Return if an algorithm is message compression algorithm. </p></div></div><a id="a053257ed8bdeba196b380f326897e25d"></a><h2 class="memtitle"><span class="permalink"><a href="#a053257ed8bdeba196b380f326897e25d">◆ </a></span>grpc_compression_algorithm_is_stream()</h2><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_is_stream </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><td>)</td>          <td></td>        </tr>      </table></div><div class="memdoc"><p>Return if an algorithm is stream compression algorithm. </p></div></div><a id="a177f6d6330355d5ecaffb042ab1c2c8f"></a><h2 class="memtitle"><span class="permalink"><a href="#a177f6d6330355d5ecaffb042ab1c2c8f">◆ </a></span>grpc_compression_algorithm_name()</h2><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">const 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 id="a5054ebec22cc256853a7ac2ed61fd654"></a><h2 class="memtitle"><span class="permalink"><a href="#a5054ebec22cc256853a7ac2ed61fd654">◆ </a></span>grpc_compression_algorithm_parse()</h2><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 <em>slice</em> as a grpc_compression_algorithm instance and updating <em>algorithm</em>. </p><p>Returns 1 upon success, 0 otherwise. </p></div></div><a id="a1b58d314775a3651ee2f5f2d3ab4f6d9"></a><h2 class="memtitle"><span class="permalink"><a href="#a1b58d314775a3651ee2f5f2d3ab4f6d9">◆ </a></span>grpc_compression_options_disable_algorithm()</h2><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 id="a79e61d1ac1d226b3b54b73837f28f0ff"></a><h2 class="memtitle"><span class="permalink"><a href="#a79e61d1ac1d226b3b54b73837f28f0ff">◆ </a></span>grpc_compression_options_enable_algorithm()</h2><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 id="a2eccdbe5a4d811a7c965d6d67e5cc7d8"></a><h2 class="memtitle"><span class="permalink"><a href="#a2eccdbe5a4d811a7c965d6d67e5cc7d8">◆ </a></span>grpc_compression_options_init()</h2><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 id="aba0dfe631311c3f49d1045694bc9b0df"></a><h2 class="memtitle"><span class="permalink"><a href="#aba0dfe631311c3f49d1045694bc9b0df">◆ </a></span>grpc_compression_options_is_algorithm_enabled()</h2><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 Tue May 15 2018 17:01:00 for GRPC Core by  <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13</small></address></body></html>
 |