ByteRangeCursor

Range based data input

Constructors

this
this(BR input, string name)
Undocumented in source.

Members

Functions

ffw
void ffw(ulong dist)
Undocumented in source. Be warned that the author may not have intended to support it.
get
ubyte get()
Undocumented in source. Be warned that the author may not have intended to support it.
read
ubyte[] read(ubyte[] buffer)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

eoi
bool eoi [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
name
string name [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
pos
ulong pos [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From Cursor

name
string name [@property getter]

The name of the data source For FileCursor, this will be the filename, otherwise a description of the type of data.

pos
ulong pos [@property getter]

Position in the stream (how many bytes read so far)

eoi
bool eoi [@property getter]

Whether end-of-input was reached

ffw
void ffw(ulong dist)

Fast-forward and discard dist bytes. Passing size_t.max will exhaust the input.

get
ubyte get()

Reads a single byte

getValue
T getValue()

Get a value of type T. Is a convenience over readValue.

read
ubyte[] read(ubyte[] buffer)

Read up to buffer.length bytes into buffer and return what was read. Returns a smaller slice only if EOI was reached.

readValue
void readValue(T* val)

Read T.sizeof data and returns it as a T. Similar to get!T but the value is passed as pointer to be filled in. Prefer this form for greater values (e.g. dozens of bytes)

read
T[] read(T[] buffer)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta