[php-src] PR #19981: Stream filter seeking
| From: | bukka | Date: | Sat, 27 Sep 2025 21:47:54 +0000 |
| Subject: | [php-src] PR #19981: Stream filter seeking | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-33371@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/19981
Author: bukka
Currently filter seeking does not work correctly for most streams. The idea is to extend API to
allow seeking for some streams. There are couple of cases:
* filter is always seekable - e.g.
string.rot13, string.toupper,
string.tolower
* filter is seekable only when sought to start or when it re-run the data from the start (it means
when there is some data buffered) - this is for pretty much all other filters that keep some state.
The seeking to zero should be quite easy as it requires just resetting the internal state.
Processing buffered data is harder and not sure if it's worth it but will check it out too.