Send a zip archive containing the content of a tar file to the standard output
<?php
require_once "File/Archive.php";
File_Archive::extract(
//The content of archive.tar appears in the root folder (default argument)
'archive.tar/',
//And is written to ...
File_Archive::toArchive( // ... a zip archive
'archive.zip', // called archive.zip
File_Archive::toOutput() // that will be sent to the standard output
)
);
?>
Extracting a file from an archive
Use extract() to get files out of an archive.
When specifying the file to extract,
make sure to use the archive name as first folder.