[phobos] std.stdio : ByChunk for File
Andrei Alexandrescu
andrei at erdani.com
Thu Aug 26 22:24:30 PDT 2010
On 5/31/10 10:00 PDT, Shin Fujishiro wrote:
>> I want chunks of Range version like ByLine(and I hope byChunk returns
>> ByChunk).
>
> I want it too.
>
> But ByChunk should be more generic IMO. It should be an adaptor which
> converts some "bulk input" to range.
>
> This is a bulk input model (similar to the Source concept*1):
> ----------
> struct BulkInput
> {
> // Returns true if there is no more data
> bool eof();
>
> // Reads data in buf and returns the number of elements read
> size_t read(T[] buf);
> size_t read(U[] buf);
> ...
> }
> ----------
What types are T and U?
Andrei
More information about the phobos
mailing list