make streams to and from buffers