simplify h2go functions to work on regular streams