Bug->Req #78915 [Asn->Opn]: Make zip streams seekable

From: Date: Thu, 05 Dec 2019 16:25:13 +0000
Subject: Bug->Req #78915 [Asn->Opn]: Make zip streams seekable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224081@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78915&edit=1 ID: 78915 Updated by: cmb@php.net Reported by: arava dot box at gmail dot com -Summary: PHP 7.3.12-1 +Summary: Make zip streams seekable -Status: Assigned +Status: Open -Type: Bug +Type: Feature/Change Request Package: Zip Related Operating System: ubuntu 18.04 PHP Version: 7.3.12 -Assigned To: cmb +Assigned To: Block user comment: N Private report: N New Comment: Thanks for the explanation! I assume that zip streams are not seekable, because fseek()[1] has only introduced recently (and maybe zip streams are already seekable if ext/zip has been built against libzip >= 1.2.0?). Anyhow, that wouldn't be a bug, but rather a feature request. And yes, the current behavior should be documented anyway. I'll see to it, unless somebody else beats me to it. [1] <https://libzip.org/documentation/zip_fseek.html> Previous Comments: ------------------------------------------------------------------------ [2019-12-05 15:55:05] arava dot box at gmail dot com Hello. Well, actually both of them. zip:// is not seekable, and if that's wrong then why it's not documented. Anyway, I am wondering to know why compress://zlib is seekable. Thx ------------------------------------------------------------------------ [2019-12-05 14:36:03] cmb@php.net What's the bug you are reporting? Is it that zip:// streams are not seekable? Or is it that this is not documented? ------------------------------------------------------------------------ [2019-12-05 13:54:11] arava dot box at gmail dot com Description: ------------ --- From manual page: https://php.net/wrappers.compression --- Test script: --------------- $sourceHandle = new SplFileObject('zip://file.zip#content.txt', 'r'); //... $sourceHandle->seek(PHP_INT_MAX); $sourceHandle->rewind(); // SplFileObject::seek(): stream does not support seeking ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78915&edit=1

« previous php.bugs (#224081) next »