sashapolo commented on code in PR #4562:
URL: https://github.com/apache/ignite-3/pull/4562#discussion_r1802529715
##########
modules/core/src/main/java/org/apache/ignite/internal/util/io/NaiveVarInts.java:
##########
@@ -20,12 +20,17 @@
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
+import org.apache.ignite.internal.util.VarIntUtils;
/**
- * Utils to read/write variable length ints.
+ * Utils to read/write naive variable length ints.
+ *
+ * <p>The 'naivety' relates to a simple algorithm. The naive varints produce
more compact results than the 'general purpose' varints
+ * (see {@link VarIntUtils}) when the input integer is approximately between
127 and 254, so they seem to be more appropriate
+ * for small values (like lengths of short strings and collections).
*/
-public class VarInts {
- private VarInts() {
+public class NaiveVarInts {
Review Comment:
yes, but I think that when you say "varint" to anyone else related to the
project, they will think of *this particular* encoding variant. So having
"naive varint" is very confusing (at least to me)
--
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]