| 81 | } |
| 82 | |
| 83 | bool PackedLiteralReader::IsExhausted() const { |
| 84 | // Try to read a single byte from offset_. If we can't, we've |
| 85 | // exhausted the data. |
| 86 | char single_byte[1]; |
| 87 | absl::string_view sp; |
| 88 | auto s = file_->Read(offset_, sizeof(single_byte), &sp, single_byte); |
| 89 | return !s.ok(); |
| 90 | } |
| 91 | |
| 92 | } // namespace xla |