Rewrote StreamSummary to consume a lot less memory and be much faster.