update doc for encoder and decoder