src/main/java/com/bazaarvoice/jackson/rison/IdentifierUtils.java
private static int[] toIdSet(boolean includeAlphaCharacters, String nonAlphaCharacters) {
        int[] bits = new int[4];  // 4*32=128 which covers all ASCII
        if (includeAlphaCharacters) {
            for (int ch = 'A'; ch <= 'Z'; ch++) {
                bits[ch >>> 5] |= (1 << (ch & 31));
            }
            for (int ch = 'a'; ch <= 'z'; ch++) {
                bits[ch >>> 5] |= (1 << (ch & 31));
            }
        }
        for (int i = 0; i < nonAlphaCharacters.length(); i++) {
            int ch = nonAlphaCharacters.charAt(i);
            if (ch >= 128) {
                throw new AssertionError(); // out of range
            }
            bits[ch >>> 5] |= (1 << (ch & 31));
        }
        return bits;
    }
private static int[] toIdSet(boolean includeAlphaCharacters, String nonAlphaCharacters) {
        int[] bits = new int[4];  // 4*32=128 which covers all ASCII
        if (includeAlphaCharacters) {
            for (int ch = 'A'; ch <= 'Z'; ch++) {
                bits[ch >>> 5] |= (1 << (ch & 31));
            }
            for (int ch = 'a'; ch <= 'z'; ch++) {
                bits[ch >>> 5] |= (1 << (ch & 31));
            }
        }
        for (int i = 0; i < nonAlphaCharacters.length(); i++) {
            int ch = nonAlphaCharacters.charAt(i);
            if (ch >= 128) {
                throw new AssertionError(); // out of range
            }
            bits[ch >>> 5] |= (1 << (ch & 31));
        }
        return bits;
    }
Encodes a set of ASCII characters (< 127) as a bitset of 4 32-bit values.