some toy code to play around with parsing arbitrary streams...