Rewrote StreamSummary to consume a lot less memory. However, it's 2x-6x slower than list-based version.