implement ioexpanding_buffer