GZip File Reading
Steven Schveighoffer
schveiguy at yahoo.com
Mon Mar 14 05:22:08 PDT 2011
On Fri, 11 Mar 2011 19:27:21 -0500, dsimcha <dsimcha at yahoo.com> wrote:
> 3. Streams in D should be based on input ranges, not whatever crufty
> old stuff std.stream is based on.
No. I/O Ranges should be based on streams. A stream is a low level
construct that can read and/or write data. In essence it is an
abstraction of the capabilities of the OS. BTW, that crufty old stuff
probably way outperforms anything you could ever do with ranges as the
base. The range interface simply isn't built to deal with I/O properly.
For example, std.stdio.File is based on FILE *, which is an opaque stream
interface.
There should probably be RangeStream which would wrap a range in a stream
interface, if you want to go that route.
-Steve
More information about the Digitalmars-d
mailing list