PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File Formats » Archive_Tar » Bug #2176

tar.gz always uncompressed

Details

Submitted2004-08-20 13:02 UTC
Fromphillip dot oertel at bestbytes dot de
Assignedvblavet
StatusClosed
PackageArchive_Tar
PHP Version4.3.8
OSwindows
Roadmaps(Not assigned)

Comments

[2004-08-20 13:02 UTC] phillip dot oertel at bestbytes dot de

Description:
------------
tar.gz files created with this module are always uncompressed, even if a compression type is specified.
problem is that the gzopen() command is called without a compression level, thus creating gz files that are the about same size as an uncompressed file (compression level 0!).

Reproduce code:
---------------
function _openWrite()
{
if ($this->_compress_type == 'gz')
$this->_file = @gzopen($this->_tarname, "wb");
[...]

Expected result:
----------------
a handle to a *compressed* gz file should be opened.
for compression, the gzopen() function call should look like this:
$this->_file = @gzopen($this->_tarname, "wb9");
or another compression ratio.

Actual result:
--------------
a handle to a *uncompressed* gz file is opened. no compression ratio is specified, so an internally uncompressed file is created.