rpuch commented on code in PR #4562: URL: https://github.com/apache/ignite-3/pull/4562#discussion_r1802489269
########## 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: You are probably talking about VLQ https://en.wikipedia.org/wiki/Variable-length_quantity But you could, technically, encode integers in a variable number of bytes, in another way (that is implemented in this class). If the name (naive var ints) is confusing, let's invent another name. Do you have suggestions? -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org