But if you have two modes of operation:
- Reading in memory data
- Reading from a stream
Then whats wrong with having two different APIs to use each mode?
Instead of you doing a if (detect in memory) in your code, it's just two different functions.
- Reading in memory data
- Reading from a stream
Then whats wrong with having two different APIs to use each mode?
Instead of you doing a if (detect in memory) in your code, it's just two different functions.
It would just be nice if it could automatically do the best thing.