buffer-to-stream