This is a helper function to write some resulting data from chrome to file. It will:
decode the base64 encoded raw data
write to file using base::writeBin()
It will be useful for function like Page$printToPDF()
write_base64(res, con)
A resulting list object with some data
field containing base64
encoded data. (like Page$printToPDF()
)
A connection object. See base::writeBin().