src/main/java/org/jcodec/containers/mkv/util/EbmlUtil.java
static public int computeLength(byte b) {
        if (b == 0x00)
            throw new RuntimeException("Invalid head element for ebml sequence");

        int i = 1;
        while ((b & lengthOptions[i]) == 0)
            i++;

        return i;
    }
static public int computeLength(byte b) {
        if (b == 0x00)
            throw new RuntimeException("Invalid head element for ebml sequence");

        int i = 1;
        while ((b & lengthOptions[i]) == 0)
            i++;

        return i;
    }
static public int computeLength ( byte b ) { if ( b == 0x00 ) throw new RuntimeException ( "Invalid head element for ebml sequence" ) ; int i = 1 ; while ( ( b & lengthOptions [ i ] ) == 0 ) i ++ ; return i ; }
This method is used mostly during reading EBML bitstream. It asnwers the question "What is the length of an integer (signed/unsigned) encountered in the bitstream"

@param b
@return
This method is used mostly during reading EBML bitstream . It asnwers the question What is the length of an integer ( signed / unsigned ) encountered in the bitstream