decode encode xwm