Home » File Formats » Archive_Tar » Bug #2176
tar.gz always uncompressed
Details
| Submitted | 2004-08-20 13:02 UTC |
|---|---|
| From | phillip dot oertel at bestbytes dot de |
| Assigned | vblavet |
| Status | Closed |
| Package | Archive_Tar |
| PHP Version | 4.3.8 |
| OS | windows |
| 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.