[Encoder] fixed start/end byte alignment