Implement 'output_stream' opcode for memory streams