private float[] normalize(byte[] pixels, float[] normComponents,
            int normOffset) {

        if (normComponents == null) {
            normComponents = new float[normOffset + pixels.length];
        }

        // trivial loop unroll - saves a little time
        switch (pixels.length) {
        case 4:
            normComponents[normOffset + 3] = decodeMins[3] + (float)(pixels[3] & 0xFF) * decodeCoefficients[3];
        case 3:
            normComponents[normOffset + 2] = decodeMins[2] + (float)(pixels[2] & 0xFF) * decodeCoefficients[2];
        case 2:
            normComponents[normOffset + 1] = decodeMins[1] + (float)(pixels[1] & 0xFF) * decodeCoefficients[1];
        case 1:
            normComponents[normOffset ] = decodeMins[0] + (float)(pixels[0] & 0xFF) * decodeCoefficients[0];
        break;
        default:
            throw new IllegalArgumentException("Someone needs to add support for more than 4 components");
        }
        return normComponents;
    }