| 25 | } |
| 26 | |
| 27 | size_t |
| 28 | decoder_read_much(DecoderClient *client, InputStream &is, |
| 29 | std::span<std::byte> dest) noexcept |
| 30 | { |
| 31 | size_t total = 0; |
| 32 | |
| 33 | while (!dest.empty() && !is.LockIsEOF()) { |
| 34 | size_t nbytes = decoder_read(client, is, dest); |
| 35 | if (nbytes == 0) |
| 36 | return false; |
| 37 | |
| 38 | dest = dest.subspan(nbytes); |
| 39 | total += nbytes; |
| 40 | } |
| 41 | |
| 42 | return total; |
| 43 | } |
| 44 | |
| 45 | bool |
| 46 | decoder_read_full(DecoderClient *client, InputStream &is, |
no test coverage detected