serializePPTFragments method
Uint8List
serializePPTFragments({
- Uint8List? argumentsBytes,
- Uint8List? argumentsKeywordsBytes,
- List? arguments,
- Map<
String, dynamic> ? argumentsKeywords,
override
Serializer PPT payload from already-encoded args / kwargs fragments when the payload serializer matches the surrounding transport serializer.
Implementation
@override
Uint8List serializePPTFragments({
Uint8List? argumentsBytes,
Uint8List? argumentsKeywordsBytes,
List<dynamic>? arguments,
Map<String, dynamic>? argumentsKeywords,
}) {
final argsBytes = argumentsBytes ?? msgpack_dart.serialize(arguments);
final kwargsBytes =
argumentsKeywordsBytes ?? msgpack_dart.serialize(argumentsKeywords);
final builder = BytesBuilder(copy: false)
..add([0x82])
..add(_pptArgsKeyBytes)
..add(argsBytes.isEmpty ? _nilBytes : argsBytes)
..add(_pptKwargsKeyBytes)
..add(kwargsBytes.isEmpty ? _nilBytes : kwargsBytes);
return builder.takeBytes();
}