Lines Matching full:bytes_to_read
134 size_t bytes_to_read = (count > kBufSize) ? kBufSize : count;
135 ssize_t actual = TEMP_FAILURE_RETRY(read(in, &buf[0], bytes_to_read));
136 if (actual != static_cast<ssize_t>(bytes_to_read)) {
140 memcpy(dst, &buf[0], bytes_to_read);
141 dst += bytes_to_read;
142 count -= bytes_to_read;
202 size_t bytes_to_read = (remaining > kBufSize) ? kBufSize : remaining;
204 ssize_t actual = TEMP_FAILURE_RETRY(read(in, read_buf.get(), bytes_to_read));
205 if (actual != static_cast<ssize_t>(bytes_to_read)) {
206 LOG(WARNING) << "Zip: inflate read failed (" << actual << " vs " << bytes_to_read << ")";
209 remaining -= bytes_to_read;
211 zstream->Get().avail_in = bytes_to_read;