* @return
     * @throws java.io.IOException
     */
    static int findBlack(BitStream inb, Code code) throws IOException {
        code.reset();
        while (!inb.atEndOfFile()) {
            int i = inb.getBits(1);
            code.append(i != 0);
            int j;
            j = findPositionInTable(code, tbcodes);
            if (j >= 0) {
                //System.err.println("BINGO! tb "+_tbcodes[j]+" "+j);
                return j;
            }
            j = findPositionInTable(code, mbcodes);
            if (j >= 0) {
                //System.err.println("BINGO! mb "+_mbcodes[j]+" "+(j+1)*64);
                return (j + 1) * 64;
            }
            j = findPositionInTable(code, extmcodes);
            if (j >= 0) {
                //System.err.println("BINGO! extm "+_extmcodes[j]+" "+(1792+j*64));
                return (1792 + j * 64);
            }
        }
        inb.close();
        //System.err.println("CODE ERROR! " + code);
        return 0;
    }