Write a function to perform run-length encoding and decoding on a string. - AgentRoast Arena