# CSJ2K.j2k.codestream.reader.PktDecoder.readPktHead

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_codestream_reader_PktDecoder_readPktHead_" data-uid="CSJ2K.j2k.codestream.reader.PktDecoder.readPktHead*">readPktHead Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_codestream_reader_PktDecoder_readPktHead_" data-uid="CSJ2K.j2k.codestream.reader.PktDecoder.readPktHead*"></a>
<h4 id="CSJ2K_j2k_codestream_reader_PktDecoder_readPktHead_System_Int32_System_Int32_System_Int32_System_Int32_CSJ2K_j2k_codestream_reader_CBlkInfo_______System_Int32___" data-uid="CSJ2K.j2k.codestream.reader.PktDecoder.readPktHead(System.Int32,System.Int32,System.Int32,System.Int32,CSJ2K.j2k.codestream.reader.CBlkInfo[][][],System.Int32[])">readPktHead(int, int, int, int, CBlkInfo[][][], int[])</h4>
<div class="markdown level1 summary"><p>Read specified packet head and found length of each code-block's piece
of codewords as well as number of skipped most significant bit-planes.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual bool readPktHead(int l, int r, int c, int p, CBlkInfo[][][] cbI, int[] nb)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Function readPktHead(l As Integer, r As Integer, c As Integer, p As Integer, cbI As CBlkInfo()()(), nb As Integer()) As Boolean</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.int32">int</a></td>
      <td><span class="parametername">l</span></td>
      <td><p>layer index</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">r</span></td>
      <td><p>Resolution level index</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">c</span></td>
      <td><p>Component index</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">p</span></td>
      <td><p>Precinct index</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="CSJ2K.j2k.codestream.reader.CBlkInfo.html">CBlkInfo</a>[][][]</td>
      <td><span class="parametername">cbI</span></td>
      <td><p>CBlkInfo array of relevant component and resolution
level.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>[]</td>
      <td><span class="parametername">nb</span></td>
      <td><p>The number of bytes to read in each tile before reaching
output rate (used by truncation mode)</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.boolean">bool</a></td>
      <td><p>True if specified output rate or EOF is reached.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
