Walter Dörwald wrote:
- The current implementation does not really support the stateful API, because trailing incomplete byte sequences lead to errors.
- The current file API is not really convenient for decoding when the input is not read for a stream.
I don't see this problem. It is straight-forward to come up with a file-like object that converts the data from whatever source into a stream. If it wasn't a byte stream/string eventually, there would be no way to meaningfully decode it.