parse static method
Parses multi-result binary data into a list of items.
Auto-detects v1 (no magic) and v2 (magic + version) framings.
Throws FormatException on malformed input or unsupported version.
Implementation
static List<MultiResultItem> parse(Uint8List data) {
if (data.length >= 4) {
final firstWord =
ByteData.sublistView(data, 0, 4).getUint32(0, _littleEndian);
if (firstWord == multiResultMagic) {
return _parseV2(data);
}
}
return _parseV1(data);
}