Functions
- OPstream* OPstreamCreate ( OPuint size )
OPstreamCreate - Allocates a byte stream instance.
- OPuint OPstreamDestroy ( OPstream* stream )
OPstreanDestroy - Deallocates memory used by a stream.
- OPuint OPwrite ( OPstream* stream, void* data, OPuint size )
OPwrite - Append data to the stream.
- ui8* OPread ( OPstream* stream, OPuint size )
OPread - Reads data and advances the pointer.
no allocation performed.
- i8 OPstreamI8 ( OPstream* stream )
- i16 OPstreamI16 ( OPstream* stream )
- i32 OPstreamI32 ( OPstream* stream )
- ui8 OPstreamUI8 ( OPstream* stream )
- ui16 OPstreamUI16 ( OPstream* stream )
- ui32 OPstreamUI32 ( OPstream* stream )
- f32 OPstreamf32 ( OPstream* stream )
- OPchar* OPstreamString ( OPstream* stream )
Reads the first string it finds in the stream
Defined by a separated space.
Ex: 'Apple Banana Pear' would return Apple
- OPchar* OPstreamReadLine ( OPstream* stream )
Reads the next line available in the OPstream
Reads until it finds a \n and will remove all \r
- OPint OPstreamReadKeyValuePair ( OPstream* stream, OPkeyValuePair* dst )
Reads a text key value pair
Ex: ' Test = My Value ' would return a KeyValue of
Key : Test
Value : My Value
- ui8* OPreadAt ( OPstream* stream, OPuint pos, OPuint size )
OPreadAt - Reads data at a specific location.
no allocation performed.
- OPuint OPcopy ( OPstream* stream, void* dest, OPuint size )
OPcopy - Reads data, and copies it into a provided buffer
- OPuint OPseek ( OPstream* stream, OPuint byte )
OPseek - Skip to a specific byte location in the stream.