Phoenix500526 commented on code in PR #12314:
URL: https://github.com/apache/arrow-rs/pull/12314#discussion_r4716082569
##########
arrow-avro/src/reader/vlq.rs:
##########
@@ -59,9 +59,12 @@ pub(crate) fn read_varint(buf: &[u8]) -> Option<(u64,
usize)> {
read_varint_slow(buf)
}
-/// Based on
-/// -
<https://github.com/tokio-rs/prost/blob/master/prost/src/encoding/varint.rs#L71>
-/// -
<https://github.com/google/protobuf/blob/3.3.x/src/google/protobuf/io/coded_stream.cc#L365-L406>
+/// Adapted from prost's varint decoder and the protobuf implementations below,
+/// with the unrolled computation expressed as a loop over a fixed-size array.
+///
+/// Historical reference implementations:
+/// -
<https://github.com/tokio-rs/prost/blob/5ae30c5fd2725132c4daa0ef9f6d2f14f1308bd5/prost/src/encoding/varint.rs#L71>
+/// -
<https://github.com/protocolbuffers/protobuf/blob/5532abc15b97f3489183b266b41844306052a3fa/src/google/protobuf/io/coded_stream.cc#L365-L406>
Review Comment:
I changed the heading to Varint decoding references and kept the upstream
links.
--
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]