tustvold commented on code in PR #2381:
URL: https://github.com/apache/arrow-rs/pull/2381#discussion_r940707807
##########
parquet/src/util/bit_util.rs:
##########
@@ -385,37 +381,18 @@ impl BitReader {
self.byte_offset += 8;
self.bit_offset -= 64;
- self.reload_buffer_values();
- v |= trailing_bits(self.buffered_values, self.bit_offset)
- .wrapping_shl((num_bits - self.bit_offset) as u32);
+ if self.bit_offset != 0 {
+ self.load_buffer();
+
+ v |= trailing_bits(self.buffered_values, self.bit_offset)
+ .wrapping_shl((num_bits - self.bit_offset) as u32);
+ }
}
// TODO: better to avoid copying here
Some(from_ne_slice(v.as_bytes()))
}
- /// Skip one value of size `num_bits`.
Review Comment:
Removed as no longer needed, was only ever called by the implementation of
`BitReader::skip` which now does something simpler
--
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]