add smsg-coder and spec for encode