taepper commented on code in PR #50763:
URL: https://github.com/apache/arrow/pull/50763#discussion_r3693274694


##########
cpp/src/arrow/ipc/feather.cc:
##########


Review Comment:
   Would it be easier to let the loop run only until `i + 1 < length`. 
   And then change L109-111:
   ```
   uint8_t r = static_cast<uint8_t>(*data++ >> bit_shift);
   *buffer_it++ = r;
   RETURN_NOT_OK(stream->Write(buffer, buffer_it - buffer));
   ```
   
   I.e. always handle the last byte after the loop.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to