Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php tar compress gzip, bzip2 file and http stream download

$ php composer.phar require "crucifyer/phptar" "dev-main"
$xtar = new \Xeno\Compress\Tar();
$xtar->addFile('../dir/file.jpg');
$xtar->addFile('file.html', 'public_html/index.html');
$xtar->addFile('../dir/file.js', 'public_html/script.js');
$xtar->addString('string contents', 'string.txt');

// file
$xtar->save('test.tar.bz2');

// stream
$xtar->stream('test.tar.bz2'); // browser realtime compress download
exit;

// unicode filename stream
// url /down/load/example.php/1234/한국어파일명.tar.bz2
// $_SERVER["PATH_INFO"] is /1234/한국어파일명.tar.bz2 
$xtar->stream(null, \Xeno\Compress\Tar::BZ);

About

tar compress gzip, bzip2 file and http stream download

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages