read method

  1. @override
Int64List read(
  1. BufferContext bc,
  2. int offset
)
inherited

Read the value at the given offset in bc.

Implementation

@override
@pragma('vm:prefer-inline')
T read(BufferContext bc, int offset) {
  final listOffset = bc.derefObject(offset);

  final length = bc.buffer.getUint32(listOffset, Endian.little);
  final result = createList(length);
  var baseOffset = listOffset + _sizeOfInt32 /* size of length value */;
  for (var i = 0; i < length; i++) {
    result[i] = getNumValue(bc.buffer, baseOffset + valueLength * i);
  }
  return result;
}