Differences From Artifact [7726e7ab7e]:
- File src/OFInflateStream.m — part of check-in [7324ec8590] at 2024-02-03 11:41:20 on branch 1.0 — Update copyright (user: js, size: 17089) [annotate] [blame] [check-ins using] [more...]
To Artifact [533f2c6519]:
- File
src/OFInflateStream.m
— part of check-in
[f7faf2bfa6]
at
2024-03-10 23:00:54
on branch 1.0
— OFInflateStream: Return if we can't read
Otherwise we spin forever if the underlying stream keeps returning 0 on
read.This can happen if the end of a ZIP part has been reached. Returning
allows to switch the underlying stream to the next part. (user: js, size: 17142) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
323 324 325 326 327 328 329 330 331 332 333 334 335 336 | return bytesWritten; tmp = (length < (size_t)CTX.length - CTX.position ? (uint16_t)length : CTX.length - CTX.position); tmp = (uint16_t)[_stream readIntoBuffer: buffer + bytesWritten length: tmp]; slidingWindow = _slidingWindow; slidingWindowIndex = _slidingWindowIndex; for (uint_fast16_t i = 0; i < tmp; i++) { slidingWindow[slidingWindowIndex] = buffer[bytesWritten + i]; slidingWindowIndex = (slidingWindowIndex + 1) & | > > > | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | return bytesWritten; tmp = (length < (size_t)CTX.length - CTX.position ? (uint16_t)length : CTX.length - CTX.position); tmp = (uint16_t)[_stream readIntoBuffer: buffer + bytesWritten length: tmp]; if OF_UNLIKELY (tmp == 0) return bytesWritten; slidingWindow = _slidingWindow; slidingWindowIndex = _slidingWindowIndex; for (uint_fast16_t i = 0; i < tmp; i++) { slidingWindow[slidingWindowIndex] = buffer[bytesWritten + i]; slidingWindowIndex = (slidingWindowIndex + 1) & |
︙ | ︙ |