I've since extracted the processing code into a separate golang package here (if you're still interested): https://github.com/Zebbeni/ansipx
I've since extracted the processing code into a separate golang package here (if you're still interested): https://github.com/Zebbeni/ansipx