Decodes input (unsigned char) into output (UINT4). Assumes len is a multiple of 4. */
| 301 | a multiple of 4. |
| 302 | */ |
| 303 | static void Decode (UINT4 *output, const unsigned char *input, unsigned int len) |
| 304 | { |
| 305 | unsigned int i, j; |
| 306 | |
| 307 | for (i = 0, j = 0; j < len; i++, j += 4) |
| 308 | output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | |
| 309 | (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); |
| 310 | } |
| 311 | |
| 312 | /* Note: Replace "for loop" with standard memcpy if possible. |
| 313 | */ |