略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Tar-based phars

2024-11-14

Tar-based phars

Archives based on the tar file format follow the more modern USTAR file format. The design of the tar file header makes them more efficient to access than the zip file format, and almost as efficient as the phar file format. File names are limited to 255 bytes, including full path within the phar archive. There is no limit on the number of files within a tar-based phar archive. These archives can fully compressed in gzip or bzip2 format and still be executed by the Phar extension.

There is limited support for reading tarballs in pax interchange format, but all recognized pax headers (currently, typeflag x and g) are silently ignored. There is also limited support for GNU Tar Archives; currently, ././@LongLink headers are resolved.

To compress an entire archive, use Phar::compress(). To decompress an entire archive, use Phar::decompress().

add a noteadd a note

User Contributed Notes 1 note

up
3
jon at enablecrm dot co dot uk
7 years ago
Whilst the ustar format may be more 'modern', it doesn't support adding files over 8GB in size to tar files.

So at time of writing, if you need to work with tar files that contain files over 8GB, you can't use PharData.

官方地址:https://www.php.net/manual/en/phar.fileformat.tar.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3