private void flushBuffer() {
        while (bits > 7) {
            ab[++idx] = (byte) (b & 0xff);
            b >>>= 8;
            bits -= 8;
        }
    }
decode an integer in the range 0..max (inclusive).

@see #encodeBounded
main/src/main/java/cgeo/geocaching/brouter/util/BitCoderContext.java