protected static byte getMask(int shiftValue) {
        int mask = 0x00;
        switch (shiftValue) {
            case 0: {mask = 0xFF; break;}
            case 1: {mask = 0x7F; break;}
            case 2: {mask = 0x3F; break;}
            case 3: {mask = 0x1F; break;}
            case 4: {mask = 0xF; break;}
            case 5: {mask = 0x7; break;}
            case 6: {mask = 0x3; break;}
            case 7: {mask = 0x1; break;}
        }
        return (byte)mask;
    }