encoding writer / streaming implementation