PHAR archive internals

180 Views Asked by At

I'm developing a plugin for 7-Zip that will allow users to open and modify phar archives. But I don't fully understand the file format. The documentation describes the "Length of manifest in bytes (1 MB limit)" field. And I can't understand what this field is. What manifest is documentation talking about? How to calculate the correct value of this field when saving the phar file?

(The question is indirectly related to the php tag, but I think only php developers can answer.)

1

There are 1 best solutions below

0
kmoser On BEST ANSWER

The manifest is the list of files in the archive. The length is the combined number of bytes taken by all of the files in the manifest.