/* Decodes input (uint8_t) into output (uint32_t). Assumes len is a multiple of 4.  */
static void ICACHE_FLASH_ATTR Decode(uint32_t *output, const uint8_t *input, uint32_t len)
/* Decodes input (uint8_t) into output (uint32_t). Assumes len is a multiple of 4.  */
static void ICACHE_FLASH_ATTR Decode(uint32_t *output, const uint8_t *input, uint32_t len)
{
    uint32_t i, j;
    for (i = 0, j = 0; j < len; i++, j += 4)
        output[i] = ((uint32_t)input[j]) | (((uint32_t)input[j+1]) << 8) |
            (((uint32_t)input[j+2]) << 16) | (((uint32_t)input[j+3]) << 24);
}