I've done something similar for storing and retrieving pulses for an infrared protocol generator.
There, the timings were in an array something like:
0: 9000
1: 4500
2: 562
3: 562
4: 562
5: 1688
where the timings were in microseconds and even indexes 0,2,4 etc. were pulse on periods and odd indexes 1,3,5 etc., were pulse off periods. Actually, these switched a carrier signal on and off. When an interval expired, the carrier was switched on or off as required and the next interval was read from the array.
Can you represent the timing sequences you have been given in such a way ?
Is the interval between repeating groups always the same ?