remove redundant variable from encode_chunk_repeat