Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29300 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79285 invoked by uid 1010); 8 May 2007 01:20:30 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 79269 invoked from network); 8 May 2007 01:20:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 May 2007 01:20:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 66.79.163.178 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 66.79.163.178 bluga.net Linux 2.5 (sometimes 2.4) (4) Received: from [66.79.163.178] ([66.79.163.178:44789] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 16/52-59486-D50DF364 for ; Mon, 07 May 2007 21:20:30 -0400 Received: from mail.bluga.net (mail.bluga.net [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id C1426873AF for ; Mon, 7 May 2007 18:20:52 -0700 (PDT) Received: from [192.168.0.106] (CPE-72-133-60-163.neb.res.rr.com [72.133.60.163]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 8A4768737B for ; Mon, 7 May 2007 18:20:52 -0700 (PDT) Message-ID: <463FD0A8.6010005@chiaraquartet.net> Date: Mon, 07 May 2007 20:21:44 -0500 User-Agent: Thunderbird 1.5.0.10 (X11/20070306) MIME-Version: 1.0 To: internals Mailing List References: <463F7301.9040104@chiaraquartet.net> In-Reply-To: <463F7301.9040104@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: how does Phar actually work? From: greg@chiaraquartet.net (Gregory Beaver) 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