To read/encode data from the stream.
Possible Error codes in the LastError property:
MacOS or Windows file system errors.
Note:
The Encode function does the same as the Read method, the Encode function is the preferred way for easier readability of the code. The Read function is provided to ensure Interface compatibility with IStreamReader.