private static long readVLong ( DataInput stream ) throws IOException { byte firstByte = stream . readByte ( ) ; int len = decodeVIntSize ( firstByte ) ; if ( len == 1 ) { return firstByte ; } long i = 0 ; for ( int idx = 0 ; idx < len - 1 ; idx ++ ) { byte b = stream . readByte ( ) ; i = i << 8 ; i = i | ( b & 0xFF ) ; } return ( isNegativeVInt ( firstByte ) ? ( i ^ - 1L ) : i ) ; }
Reads a zero - compressed encoded long from input stream and returns it .