Both `Memory[In|Out]putStream::close()` currently do nothing. It should be checked whether a call to them should actually reset the internal buffer.