subset method
Return a InputStream to read a subset of this stream. It does not
move the read position of this stream. position
is specified relative
to the start of the buffer. If position
is not specified, the current
read position is used. If length is not specified, the remainder of this
stream is used.
Implementation
InputBuffer subset(int count, {int? position, int offset = 0}) {
var pos = position != null ? start + position : this.offset;
pos += offset;
return InputBuffer(buffer,
bigEndian: bigEndian, offset: pos, length: count);
}