New version of encoder interface