note 71833 added to function.gztell

From: Date: Mon, 18 Dec 2006 18:09:06 +0000
Subject: note 71833 added to function.gztell
Groups: php.notes 
Request: Send a blank email to php-notes+get-120750@lists.php.net to get a copy of this message
ok so this function returns the gz file pointer as the uncompressed data byte length so if you are trying to put something in to specific size gzip files it won't work. Example: <? //some_file.sql filesize = 2,048,000 bytes $text_fp=fopen('some_file.sql','r'); $gz_fp=gzopen('some_file.sql.gz','wb9'); while(!feof($text_fp)){ gzwrite($gz_fp,fread($text_fp,655360)); } fclose($text_fp); echo "gztell = ".gztell($gz_fp)."<BR>\n"; gzclose($gz_fp); echo "filesize = ".filesize('some_file.sql.gz')."<BR>\n"; ?> Output: gztell = 2048000 filesize = 249264 I will report this as a bug but post a note here for now ---- Server IP: 66.207.199.35 Probable Submitter: 24.85.99.105 ---- Manual Page -- http://www.php.net/manual/en/function.gztell.php Edit -- https://master.php.net/note/edit/71833 Del: integrated -- https://master.php.net/note/delete/71833/integrated Del: useless -- https://master.php.net/note/delete/71833/useless Del: bad code -- https://master.php.net/note/delete/71833/bad+code Del: spam -- https://master.php.net/note/delete/71833/spam Del: non-english -- https://master.php.net/note/delete/71833/non-english Del: in docs -- https://master.php.net/note/delete/71833/in+docs Del: other reasons-- https://master.php.net/note/delete/71833 Reject -- https://master.php.net/note/reject/71833 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120750) next »