wstream: simplify wstream_write interface