parse the buffer into a {type, data} object
0.0.2