Mercurial > hg > isophonics-drupal-site
comparison vendor/guzzlehttp/psr7/src/InflateStream.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
25 $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); | 25 $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); |
26 // Skip the header, that is 10 + length of filename + 1 (nil) bytes | 26 // Skip the header, that is 10 + length of filename + 1 (nil) bytes |
27 $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength); | 27 $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength); |
28 $resource = StreamWrapper::getResource($stream); | 28 $resource = StreamWrapper::getResource($stream); |
29 stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); | 29 stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); |
30 $this->stream = new Stream($resource); | 30 $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); |
31 } | 31 } |
32 | 32 |
33 /** | 33 /** |
34 * @param StreamInterface $stream | 34 * @param StreamInterface $stream |
35 * @param $header | 35 * @param $header |