Google is committed to advancing racial equity for Black communities. See how.

decode method

  • @override

UnknownRawData decode (Decoder decoder, int offset, int depth)

override

Implementation

@override
UnknownRawData decode(Decoder decoder, int offset, int depth) {
  final Uint8List data = Uint8List(numBytes);
  for (var i = 0; i < numBytes; i++) {
    data[i] = decoder.decodeUint8(offset + i);
  }
  final handleInfos =
      List<HandleInfo>.generate(numHandles, (int i) => decoder.claimHandle());
  return UnknownRawData(
      data, handleInfos.map((handleInfo) => handleInfo.handle).toList());
}