Update encode structure