Phoenix500526 commented on code in PR #12314:
URL: https://github.com/apache/arrow-rs/pull/12314#discussion_r4716054308
##########
arrow-avro/src/reader/vlq.rs:
##########
@@ -79,6 +82,11 @@ fn read_varint_array(buf: [u8; 10]) -> Option<(u64, usize)> {
(b < 0x02).then_some((in_progress, 10))
}
+/// Adapted from prost's decode_varint_slow to read a slice and return
+/// both the decoded value and the number of bytes consumed.
+///
+/// Historical reference implementation:
+///
<https://github.com/tokio-rs/prost/blob/5ae30c5fd2725132c4daa0ef9f6d2f14f1308bd5/prost/src/encoding/varint.rs>
Review Comment:
I removed the inline comment. I also changed the loop to use &byte and take
the byte directly from the iterator.
--
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]