# C1.Zip.ZLib.ZStream.inflateSetDictionary

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Zip_ZLib_ZStream_inflateSetDictionary_" data-uid="C1.Zip.ZLib.ZStream.inflateSetDictionary*">inflateSetDictionary Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Zip_ZLib_ZStream_inflateSetDictionary_" data-uid="C1.Zip.ZLib.ZStream.inflateSetDictionary*"></a>
<h4 id="C1_Zip_ZLib_ZStream_inflateSetDictionary_System_Byte___System_Int32_" data-uid="C1.Zip.ZLib.ZStream.inflateSetDictionary(System.Byte[],System.Int32)">inflateSetDictionary(byte[], int)</h4>
<div class="markdown level1 summary"><p>Initializes the decompression dictionary from the given uncompressed byte sequence.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public int inflateSetDictionary(byte[] dictionary, int dictLength)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function inflateSetDictionary(dictionary As Byte(), dictLength As Integer) As Integer</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</td>
      <td><span class="parametername">dictionary</span></td>
      <td><p>Data in the dictionary.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">dictLength</span></td>
      <td><p>Number of bytes in the dictionary.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><p>Zero on success, an error code on failure.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Zip_ZLib_ZStream_inflateSetDictionary_System_Byte___System_Int32__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method must be called immediately after a call of <a class="xref" href="C1.Zip.ZLib.ZStream.inflate.html#C1_Zip_ZLib_ZStream_inflate_System_Int32_">inflate(int)</a> 
if this call returned <b>Z_NEED_DICT</b>. The dictionary chosen by the compressor 
can be determined from the <b>Adler32</b> value returned by this call to <b>inflate</b>.</p>
<p>The compressor and decompressor must use exactly the same dictionary 
(see the <a class="xref" href="C1.Zip.ZLib.ZStream.deflateSetDictionary.html#C1_Zip_ZLib_ZStream_deflateSetDictionary_System_Byte___System_Int32_">deflateSetDictionary(byte[], int)</a> method).</p>
</div>
</div>
