Gregory Beaver wrote:
[snip]
> megabytes of information just to locate a file.  The zip file format has
> the same limitation - the entire archive needs to be scanned.
> 
> Both of these formats were not designed for random access in the way a
> traditional filesystem is designed.  In fact, I could not find an
> example of a archive format that is designed for this.

Josh Eichorn challenged this assertion on IRC, and so I took another
look at the zip file format.  It turns out, I was wrong - the format has
something called a "central directory" at the end of the file, which is
the equivalent to the manifest that phar uses.  I apologize for the
misrepresentation.

Because the .zip file format cannot be parsed directly by PHP in the way
that a phar archive can (in other words "php somefile.zip" yields
gibberish, whereas "php somefile.phar" allows php loader execution), in
order to use this for the phar file format, it would require some
changes to PHP itself.

In other words, php would do better to simply port over Java's jar stuff
rather than phar if this is what people want (to be perfectly clear I'm
not volunteering to do this).

Greg

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to