27 $stream =
new LimitStream($stream, -1, 10 + $filenameHeaderLength);
29 stream_filter_append($resource,
'zlib.inflate', STREAM_FILTER_READ);
30 $this->stream =
new Stream($resource);
40 $filename_header_length = 0;
42 if (substr(bin2hex(
$header), 6, 2) ===
'08') {
44 $filename_header_length = 1;
45 while ($stream->
read(1) !== chr(0)) {
46 $filename_header_length++;
50 return $filename_header_length;
read($length)
Read data from the stream.
Decorator used to return only a subset of a stream.
getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header)
$stream
PHP stream implementation.
static getResource(StreamInterface $stream)
Returns a resource representing the stream.
Uses PHP's zlib.inflate filter to inflate deflate or gzipped content.
__construct(StreamInterface $stream)