PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

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.