v0.3.4 stream encoder fix on large inputs