How to parse a high rate stream of data with low memory allocation