add doc + test for RTEncode