in computer-core/src/main/java/org/apache/hugegraph/computer/core/io/OptimizedBytesOutput.java [154:169]
private void writeVInt(int value) throws IOException {
// NOTE: negative numbers are not compressed
if (value > 0x0fffffff || value < 0) {
this.writeByte(0x80 | ((value >>> 28) & 0x7f));
}
if (value > 0x1fffff || value < 0) {
this.writeByte(0x80 | ((value >>> 21) & 0x7f));
}
if (value > 0x3fff || value < 0) {
this.writeByte(0x80 | ((value >>> 14) & 0x7f));
}
if (value > 0x7f || value < 0) {
this.writeByte(0x80 | ((value >>> 7) & 0x7f));
}
this.writeByte(value & 0x7f);
}