ByChunk

Range that reads up to a fixed size chunk of data from a stream at a time.

Constructors

this
this(Stream source, size_t size)

Initializes the range. A byte buffer with the given size is allocated to hold the chunks.

this
this(Stream source, ubyte[] buffer)

Initializes the range with the specified buffer. This is useful for providing your own buffer that may be stack allocated.

Members

Functions

empty
bool empty()

Returns true if there are no more chunks to be read from the stream.

front
const(ubyte)[] front()
popFront
void popFront()

Reads the next chunk from the stream.

Meta