read method
Read the value at the given offset
in bc
.
Implementation
@override
@pragma('vm:prefer-inline')
String read(BufferContext bc, int offset) {
final strOffset = bc.derefObject(offset);
final length = bc._getUint32(strOffset);
final bytes = bc._asUint8List(strOffset + _sizeofUint32, length);
if (asciiOptimization && _isLatin(bytes)) {
return String.fromCharCodes(bytes);
}
return utf8.decode(bytes);
}