Need to find out if its carb or something else, but sounds like carb. If it was electrical it would just run good, bad, good , bad
You said no spark at the beginning. Your compression gauge could be off but it would be way off with 170 psi. My guess is its flooding
Watch the carb down its...