BinaryRange constructor

BinaryRange(
  1. Uint8List bytes, {
  2. int? begin,
  3. int? end,
})

Creates a new binary range from the bytes, starting at the begin offset and ending at the end offset.

If the begin offset is not specified, it is initialized to the start of the bytes (i.e. to offset zero).

If the end offset is not specified, it is initialized to after the last byte in the data (i.e. to the length of the data).

The bytes are not copied, so the program should not change the data while the binary range is in use.

Implementation

BinaryRange(Uint8List bytes, {int? begin, int? end})
    : _bytes = bytes,
      _begin = begin ?? 0,
      _end = end ?? bytes.length;