some utilities for whatwg streams