.. # split from OEPlatformFunctions.rst:525

.. include:: ../substitutions

.. oe:namespace:: OEPlatform

.. meta::
   :keywords: OEOpenIStream

.. oe:function:: OEOpenIStream

   .. oe:language:: c++ java csharp

      .. oe:api::

         oeistream* OEOpenIStream(const char *)

   .. oe:language:: python

      .. oe:api:: python

         OEOpenIStream(arg1: str) -> oeistream

   Creates and returns an :ref:`oeistream <OEPlatform_oeistream>` input stream
   capable of reading the input
   specified by the source parameter. The source parameter is
   initially parsed to determine whether a colon delimited protocol
   was specified. If no protocol was specified, it is assumed that the
   source parameter refers to a filename. If a protocol was specified,
   the function checks to see whether an input stream allocator and
   deallocator have been registered to handle the appropriate
   protocol. If the specified protocol has been registered, the
   appropriate input stream will be created and returned, otherwise
   the function will return ``0``. Allocators and deallocators for
   specific protocols can be registered using the
   :oe:func:`OEPlatform::OERegisterIStream` function.

   .. code-block:: c++

      oeistream *is = OEOpenIStream("pipe: echo \"hello world\"");


   In addition, this function will attempt to assess whether or not
   the input data is compressed. If the data is compressed in a
   supported format, the appropriate decompression wrapper stream will
   be used to dynamically decompress the data.

   .. warning::

      All streams created with this function MUST be closed with the
      :oe:func:`OEPlatform::OECloseIStream` function.

