ByBlock

Wraps a stream in a range interface such that blocks of a fixed size are read from the source. It is assumed that the stream is buffered so that performance is not adversely affected.

Since streams and ranges are fundamentally different, this is useful for performing range operations on streams.

Note: This is an input range and cannot be saved with save(). Thus, usage of this should not be mixed with the underlying stream without first seeking to a specific location in the stream.

Constructors

this
this(Stream source)

Initializes the range with a source stream.

Members

Functions

popFront
void popFront()

Removes one block from the stream.

Properties

empty
bool empty [@property getter]

The range is considered empty when less than T.sizeof bytes can be read from the stream.

front
const(T) front [@property getter]

Meta