# C1.Zip.C1ZStreamReader.Read

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Zip_C1ZStreamReader_Read_" data-uid="C1.Zip.C1ZStreamReader.Read*">Read Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Zip_C1ZStreamReader_Read_" data-uid="C1.Zip.C1ZStreamReader.Read*"></a>
<h4 id="C1_Zip_C1ZStreamReader_Read_System_Byte___System_Int32_System_Int32_" data-uid="C1.Zip.C1ZStreamReader.Read(System.Byte[],System.Int32,System.Int32)">Read(byte[], int, int)</h4>
<div class="markdown level1 summary"><p>Reads a sequence of bytes from the underlying compressed stream, decompressing them into
a buffer, then advances the position within the stream by the number of bytes read.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public override int Read(byte[] buf, int offset, int count)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overrides Function Read(buf As Byte(), offset As Integer, count 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">buf</span></td>
      <td><p>An array of bytes. When this method returns, <code class="paramref">buf</code> contains the specified byte array with the values between <code class="paramref">offset</code>and (<code class="paramref">offset</code> + <code class="paramref">count</code>) replaced by the uncompressed data read from the stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">offset</span></td>
      <td><p>The zero-based byte offset in <code class="paramref">buf</code> at which to begin storing the data read from the current stream.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">count</span></td>
      <td><p>The maximum number of (decompressed) bytes to be read from the current stream.</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>The total number of bytes read into the buffer. This may be less than the number of bytes
requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream.read#system-io-stream-read(system-byte()-system-int32-system-int32)">Stream.Read(byte[], int, int)</a></div>
</div>
