hollow/src/main/java/com/netflix/hollow/core/memory/encoding/VarInt.java
public static int sizeOfVLong(long value) {
        if(value < 0L)
            return 10;
        if(value < 0x80L)
            return 1;
        if(value < 0x4000L)
            return 2;
        if(value < 0x200000L)
            return 3;
        if(value < 0x10000000L)
            return 4;
        if(value < 0x800000000L)
            return 5;
        if(value < 0x40000000000L)
            return 6;
        if(value < 0x2000000000000L)
            return 7;
        if(value < 0x100000000000000L)
            return 8;
        return 9;
    }
public static int sizeOfVLong(long value) {
        if(value < 0L)
            return 10;
        if(value < 0x80L)
            return 1;
        if(value < 0x4000L)
            return 2;
        if(value < 0x200000L)
            return 3;
        if(value < 0x10000000L)
            return 4;
        if(value < 0x800000000L)
            return 5;
        if(value < 0x40000000000L)
            return 6;
        if(value < 0x2000000000000L)
            return 7;
        if(value < 0x100000000000000L)
            return 8;
        return 9;
    }
public static int sizeOfVLong ( long value ) { if ( value < 0L ) return 10 ; if ( value < 0x80 L ) return 1 ; if ( value < 0x4000 L ) return 2 ; if ( value < 0x200000 L ) return 3 ; if ( value < 0x10000000 L ) return 4 ; if ( value < 0x800000000 L ) return 5 ; if ( value < 0x40000000000 L ) return 6 ; if ( value < 0x2000000000000 L ) return 7 ; if ( value < 0x100000000000000 L ) return 8 ; return 9 ; }
Determine the size (in bytes) of the specified value when encoded as a variable length integer.
@param value the long value
@return the size (int bytes) of the value when encoded
Determine the size ( in bytes ) of the specified value when encoded as a variable length integer .