hollow/src/main/java/com/netflix/hollow/core/memory/encoding/VarInt.java
public static void writeVLong(ByteDataBuffer buf, long value) {
        if(value < 0)                                buf.write((byte)0x81);
        if(value > 0xFFFFFFFFFFFFFFL || value < 0)   buf.write((byte)(0x80 | ((value >>> 56) & 0x7FL)));
        if(value > 0x1FFFFFFFFFFFFL || value < 0)    buf.write((byte)(0x80 | ((value >>> 49) & 0x7FL)));
        if(value > 0x3FFFFFFFFFFL || value < 0)      buf.write((byte)(0x80 | ((value >>> 42) & 0x7FL)));
        if(value > 0x7FFFFFFFFL || value < 0)        buf.write((byte)(0x80 | ((value >>> 35) & 0x7FL)));
        if(value > 0xFFFFFFFL || value < 0)          buf.write((byte)(0x80 | ((value >>> 28) & 0x7FL)));
        if(value > 0x1FFFFFL || value < 0)           buf.write((byte)(0x80 | ((value >>> 21) & 0x7FL)));
        if(value > 0x3FFFL || value < 0)             buf.write((byte)(0x80 | ((value >>> 14) & 0x7FL)));
        if(value > 0x7FL || value < 0)               buf.write((byte)(0x80 | ((value >>>  7) & 0x7FL)));

        buf.write((byte)(value & 0x7FL));
    }
public static void writeVLong(ByteDataBuffer buf, long value) {
        if(value < 0)                                buf.write((byte)0x81);
        if(value > 0xFFFFFFFFFFFFFFL || value < 0)   buf.write((byte)(0x80 | ((value >>> 56) & 0x7FL)));
        if(value > 0x1FFFFFFFFFFFFL || value < 0)    buf.write((byte)(0x80 | ((value >>> 49) & 0x7FL)));
        if(value > 0x3FFFFFFFFFFL || value < 0)      buf.write((byte)(0x80 | ((value >>> 42) & 0x7FL)));
        if(value > 0x7FFFFFFFFL || value < 0)        buf.write((byte)(0x80 | ((value >>> 35) & 0x7FL)));
        if(value > 0xFFFFFFFL || value < 0)          buf.write((byte)(0x80 | ((value >>> 28) & 0x7FL)));
        if(value > 0x1FFFFFL || value < 0)           buf.write((byte)(0x80 | ((value >>> 21) & 0x7FL)));
        if(value > 0x3FFFL || value < 0)             buf.write((byte)(0x80 | ((value >>> 14) & 0x7FL)));
        if(value > 0x7FL || value < 0)               buf.write((byte)(0x80 | ((value >>>  7) & 0x7FL)));

        buf.write((byte)(value & 0x7FL));
    }
public static void writeVLong ( ByteDataBuffer buf , long value ) { if ( value < 0 ) buf . write ( ( byte ) 0x81 ) ; if ( value > 0xFFFFFFFFFFFFFF L || value < 0 ) buf . write ( ( byte ) ( 0x80 | ( ( value >>> 56 ) & 0x7F L ) ) ) ; if ( value > 0x1FFFFFFFFFFFF L || value < 0 ) buf . write ( ( byte ) ( 0x80 | ( ( value >>> 49 ) & 0x7F L ) ) ) ; if ( value > 0x3FFFFFFFFFF L || value < 0 ) buf . write ( ( byte ) ( 0x80 | ( ( value >>> 42 ) & 0x7F L ) ) ) ; if ( value > 0x7FFFFFFFF L || value < 0 ) buf . write ( ( byte ) ( 0x80 | ( ( value >>> 35 ) & 0x7F L ) ) ) ; if ( value > 0xFFFFFFF L || value < 0 ) buf . write ( ( byte ) ( 0x80 | ( ( value >>> 28 ) & 0x7F L ) ) ) ; if ( value > 0x1FFFFF L || value < 0 ) buf . write ( ( byte ) ( 0x80 | ( ( value >>> 21 ) & 0x7F L ) ) ) ; if ( value > 0x3FFF L || value < 0 ) buf . write ( ( byte ) ( 0x80 | ( ( value >>> 14 ) & 0x7F L ) ) ) ; if ( value > 0x7F L || value < 0 ) buf . write ( ( byte ) ( 0x80 | ( ( value >>> 7 ) & 0x7F L ) ) ) ; buf . write ( ( byte ) ( value & 0x7F L ) ) ; }
Encode the specified long as a variable length integer into the supplied {@link ByteDataBuffer}

@param buf the buffer to write to
@param value the long value
Encode the specified long as a variable length integer into the supplied { @link ByteDataBuffer }