We need to send some coordinates to a spaceship through a laser beam.
To do that we have to encode it, and beam it out into space.
Your mission is to implement the encoder with a compression standard.
As usual shortest solution wins.
Task
You will receive a string of comma-separated integers and you will return a new string of comma-separated integers and sequence descriptors.
Input
"0,2,4,5,5,5,5,5,3,4,5"
Output
"0-4/2,5*5,3-5"