On Tue, Mar 10, 2020, 4:51 PM Phil Endecott via Boost
Janson R. wrote:
All of this C++20 mindset made me wonder if a codec API could be almost as simple and elegant as making it into a range adaptor (requiring memory contiguity of course); what do you and possibly other readers think of that?
I suspect that for things like streaming compression and encryption APIs, in a couple of years we'll all agree that the right way to do them will be as co-routines.
co-routines only add overhead in cases that are processing intensive and run on the local CPU. they are meant for tasks where you wait for the result and CPU can use that thread for something else in the meantime. (Personally, nearly all of my recent use of these things has been
for relatively small data; a simple non-streaming API i.e. take a span<byte> and return a vector<byte> would be perfect.)
I agree that it would be a nice first step but as I said if this project continues I'd still prefer a stream/iterator supporting api (my general use case) in addition to this. Perhaps I'll write an api when I get home instead of just words... Regards, Domen
Regards, Phil.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost