<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.bzip2.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.bzwrite.php',
    1 => 'bzwrite',
    2 => 'Bin&auml;r-sicheres Schreiben einer bzip2-Datei',
  ),
  'up' => 
  array (
    0 => 'ref.bzip2.php',
    1 => 'Bzip2 Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.bzread.php',
    1 => 'bzread',
  ),
  'next' => 
  array (
    0 => 'book.lzf.php',
    1 => 'LZF',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/bzip2/functions/bzwrite.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.bzwrite" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">bzwrite</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">bzwrite</span> &mdash; <span class="dc-title">Binär-sicheres Schreiben einer bzip2-Datei</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.bzwrite-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>bzwrite</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$bz</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$data</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$length</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="simpara">
   <span class="function"><strong>bzwrite()</strong></span> schreibt eine Zeichenkette in den
   übergebenen bzip2-Dateistream.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.bzwrite-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
    <dt><code class="parameter">bz</code></dt>
    <dd>
     <span class="simpara">
      Der Dateizeiger. Muss gültig sein und auf eine erfolgreich von
      <span class="function"><a href="function.bzopen.php" class="function">bzopen()</a></span> geöffnete Datei zeigen.
     </span>
    </dd>
   
   
    <dt><code class="parameter">data</code></dt>
    <dd>
     <span class="simpara">
      Die zu schreibenden Daten.
     </span>
    </dd>
   
   
    <dt><code class="parameter">length</code></dt>
    <dd>
     <span class="simpara">
      Wird dieser Parameter übergeben, stoppt das Schreiben nach
      <code class="parameter">length</code> (unkomprimiert) geschriebenen
      Bytes oder wenn alle Bytes aus <code class="parameter">data</code>
      geschrieben wurden, je nachdem, welcher Fall zuerst auftritt.
     </span>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.bzwrite-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="simpara">
   Gibt die Anzahl der geschriebenen Bytes bzw. <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> im Falle eines
   Fehlers zurück.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.bzwrite-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">length</code> ist jetzt nullbar.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.bzwrite-examples">
  <h3 class="title">Beispiele</h3>
  <div class="example" id="example-1">
   <p><strong>Beispiel #1 <span class="function"><strong>bzwrite()</strong></span>-Beispiel</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$str </span><span style="color: #007700">= </span><span style="color: #DD0000">"uncompressed data"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$bz </span><span style="color: #007700">= </span><span style="color: #0000BB">bzopen</span><span style="color: #007700">(</span><span style="color: #DD0000">"/tmp/foo.bz2"</span><span style="color: #007700">, </span><span style="color: #DD0000">"w"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">bzwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">$bz</span><span style="color: #007700">, </span><span style="color: #0000BB">$str</span><span style="color: #007700">, </span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">$str</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">bzclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$bz</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.bzwrite-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.bzread.php" class="function" rel="rdfs-seeAlso">bzread()</a> - Bin&auml;r-sicheres Lesen aus einer bzip2-Datei</span></li>
   <li><span class="function"><a href="function.bzopen.php" class="function" rel="rdfs-seeAlso">bzopen()</a> - &Ouml;ffnet eine bzip2-komprimierte Datei</span></li>
  </ul>
 </div>

</div><?php manual_footer($setup); ?>