OEOpenIStream

oeistream *OEOpenIStream(const char *)

Creates and returns an 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 OERegisterIStream function.

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 OECloseIStream function.