dongjoon-hyun commented on a change in pull request #886:
URL: https://github.com/apache/orc/pull/886#discussion_r698132658
##########
File path: java/core/src/java/org/apache/orc/impl/SerializationUtils.java
##########
@@ -270,8 +270,16 @@ public static BigInteger readBigInteger(InputStream input)
throws IOException {
* @return bits required to store value
*/
public int findClosestNumBits(long value) {
- final int numBits = 64 - Long.numberOfLeadingZeros(value);
- return getClosestFixedBits(numBits);
+ return getClosestFixedBits(findNumBits(value));
+ }
+
+ /**
+ * Count the number of bits left after subtracting leading zeros
+ * @param value
+ * @return bits left after subtracting leading zeros
+ */
+ public int findNumBits(long value) {
Review comment:
Ya, it's tricky. Then, shall we make this `private`? In that case, we
don't need to care much about naming.
--
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]