<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Phar manifest file entry definition</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="phar.fileformat.flags.html">Global Phar bitmapped flags</a></div> <div class="next" style="text-align: right; float: right;"><a href="phar.fileformat.signature.html">Phar Signature format</a></div> <div class="up"><a href="phar.fileformat.html">What makes a phar a phar and not a tar or a zip?</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><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 (<em>0</em> for none)</td> </tr> <tr> <td>??</td> <td>Serialized File Meta-data, stored in <span class="function"><a href="function.serialize.html" 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 <em>my/directory/</em> </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><em>0x000001FF</em></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.html" class="function">fstat()</a></span> and can be used to recreate desired permissions upon extraction. </td> </tr> <tr> <td><em>0x00001000</em></td> <td> If set, this file is compressed with zlib compression </td> </tr> <tr> <td><em>0x00002000</em></td> <td> If set, this file is compressed with bzip compression </td> </tr> </tbody> </table> </p> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="phar.fileformat.flags.html">Global Phar bitmapped flags</a></div> <div class="next" style="text-align: right; float: right;"><a href="phar.fileformat.signature.html">Phar Signature format</a></div> <div class="up"><a href="phar.fileformat.html">What makes a phar a phar and not a tar or a zip?</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>