stream == range ? [Sliding window]

Dragos Carp via Digitalmars-d digitalmars-d at puremagic.com
Sun May 31 16:11:35 PDT 2015


On Sunday, 31 May 2015 at 22:53:58 UTC, Andrei Alexandrescu wrote:

> There's some misunderstanding along the way. Input ranges use 
> buffering internally as a matter of course, nothing scary about 
> that. In addition to that, primitives that transfer data in 
> bulk are welcome too. That's how many languages define their 
> file APIs. Zero-copy interfaces and such are of course welcome 
> as well. -- Andrei

It will be useful that the bulkRead returns useful chunks of 
input by preprocessing the internal buffer. Something along the 
lines of boost::asio async_read_until:
http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/reference/async_read_until.html


More information about the Digitalmars-d mailing list