| 525 | } |
| 526 | |
| 527 | Status CheckAligned(io::FileInterface* stream, int32_t alignment) { |
| 528 | ARROW_ASSIGN_OR_RAISE(int64_t position, stream->Tell()); |
| 529 | if (position % alignment != 0) { |
| 530 | return Status::Invalid("Stream is not aligned pos: ", position, |
| 531 | " alignment: ", alignment); |
| 532 | } else { |
| 533 | return Status::OK(); |
| 534 | } |
| 535 | } |
| 536 | |
| 537 | Status DecodeMessage(MessageDecoder* decoder, io::InputStream* file) { |
| 538 | if (decoder->state() == MessageDecoder::State::INITIAL) { |