To abort decoding, call Abort from the events used by the decoder.
To abort encoding, simply return a non-zero value from the encoding event.
Abort has no affect when using a custom StreamReader or StreamWriter, when using such classes then the correct way to cancel the
coding process is to let the StreamReader/Writer return a error value in the LastError property of the Streaming interface.