<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/phar.fileformat.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'phar.fileformat.manifestfile.php',
    1 => 'Phar manifest file entry definition',
    2 => 'Phar manifest file entry definition',
  ),
  'up' => 
  array (
    0 => 'phar.fileformat.php',
    1 => 'What makes a phar a phar and not a tar or a zip?',
  ),
  'prev' => 
  array (
    0 => 'phar.fileformat.flags.php',
    1 => 'Global Phar bitmapped flags',
  ),
  'next' => 
  array (
    0 => 'phar.fileformat.signature.php',
    1 => 'Phar Signature format',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/phar/fileformat.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="phar.fileformat.manifestfile" class="section">
 <h2 class="title">Phar manifest file entry definition</h2>
 <p class="para">
  Each file in the manifest contains the following information:
 </p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>Phar Manifest file entry</strong></caption>
   
    <thead>
     <tr>
      <th>Size in bytes</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>4 bytes</td>
      <td>Filename length in bytes</td>
     </tr>

     <tr>
      <td>??</td>
      <td>Filename (length specified in previous)</td>
     </tr>

     <tr>
      <td>4 bytes</td>
      <td>Un-compressed file size in bytes</td>
     </tr>

     <tr>
      <td>4 bytes</td>
      <td>Unix timestamp of file</td>
     </tr>

     <tr>
      <td>4 bytes</td>
      <td>Compressed file size in bytes</td>
     </tr>

     <tr>
      <td>4 bytes</td>
      <td>CRC32 checksum of un-compressed file contents</td>
     </tr>

     <tr>
      <td>4 bytes</td>
      <td>Bit-mapped File-specific flags</td>
     </tr>

     <tr>
      <td>4 bytes</td>
      <td>Serialized File Meta-data length (<code class="literal">0</code> for none)</td>
     </tr>

     <tr>
      <td>??</td>
      <td>Serialized File Meta-data, stored in <span class="function"><a href="function.serialize.php" class="function">serialize()</a></span> format</td>
     </tr>

    </tbody>
   
  </table>

 </p>
 <p class="para">
  Note that as of API version 1.1.1, empty directories are stored as filenames
  with a trailing slash like <code class="literal">my/directory/</code>
 </p>
 <p class="para">
  The File-specific bitmap values recognized are:
 </p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>Bitmap values recognized</strong></caption>
   
    <thead>
     <tr>
      <th>Value</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><code class="literal">0x000001FF</code></td>
      <td>
       These bits are reserved for defining specific file permissions
       of a file.  Permissions are used for <span class="function"><a href="function.fstat.php" class="function">fstat()</a></span>
       and can be used to recreate desired permissions upon extraction.
      </td>
     </tr>

     <tr>
      <td><code class="literal">0x00001000</code></td>
      <td>
       If set, this file is compressed with zlib DEFLATE compression
      </td>
     </tr>

     <tr>
      <td><code class="literal">0x00002000</code></td>
      <td>
       If set, this file is compressed with bzip2 compression
      </td>
     </tr>

    </tbody>
   
  </table>

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