Encode header / start of encode RR function