The function is given an array of characters. Compress the array into a string using the following rules. For each group of consecutively repeating characters:
n of repeating characters x is greater than one, append the string with "x" + str(n).compress(["a", "a", "b", "b", "c", "c", "c"]) ➞ "a2b2c3"
compress(["a"]) ➞ "a"
compress(["a", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b", "b"]) ➞ "ab12"
compress(["a", "a", "a", "b", "b", "a", "a"]) ➞ "a3b2a2"
N/A