Implement the method compressRuns that compresses consecutive repeated characters.
Replace each consecutive run with the character followed by the number of times it appears in that run.
The task is designed to test careful handling of edge cases, not only the most common input.
- Single characters still receive a count of
1. - Preserve the original order of runs.
- The test cases use visible characters without spaces.
Track the current character and run length. Append the previous run whenever the character changes.