I am using a extractToPHP class method PharDatato examine the contents of a phar file and work with some degradation results. I went to the limits of the detective work of my byte level and was hoping that someone here could help me figure this out.
Details follow, but generally speaking: when I extract my archive files using PharData::extractTo, the files I receive are bzipvarient, but bzip2they don’t like the command . Is this normal behavior phar, or is it a problem with a specific archive? (or maybe the combination of PHP / OS that I am using). Is there a way to get text files from a phar archive - or should there be plain text by default, and I look at the strange behavior of the system?
In particular, when I run the command
$phar = new Phar('n98-magerun.phar');
$phar->extractTo('/tmp/n98-magerun');
In my OS 10.6.8, based on Intel Mac using the built-in PHP 5.3.6, the archive is successfully extracted to the / tmp / n 98-magerun folder.

The archive that I am extracting can be found here .
If I open any of the text files extracted in BBEdit, I see the correct content.

, , quicklook, vi cat, . ack/grep , .

file , , bzip.
$ file MIT-LICENSE.txt
MIT-LICENSE.txt: bzip2 compressed data, block size = 400k
, BZ

bzip2
$ bzip2 -d MIT-LICENSE.txt
bzip2: Can't guess original name for MIT-LICENSE.txt -- using MIT-LICENSE.txt.out
bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: No such file or directory
Input file = MIT-LICENSE.txt, output file = MIT-LICENSE.txt.out
It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.
You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.
bzip2: Deleting output file MIT-LICENSE.txt.out, if it exists.
bzcat ,
bzcat: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzcat: Undefined error: 0
Input file = MIT-LICENSE.txt, output file = (stdout)
It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.
You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.