encode method
Implementation
@override
BcsWriter encode(data, options, typeParams) {
final typeMap = <String, dynamic>{};
for (var i = 0; i < generics.length; i++) {
typeMap[generics[i]] = typeParams[i];
}
final bcsWriter = BcsWriter(
size: options?.size ?? 4096,
maxSize: options?.maxSize,
allocateSize: options?.allocateSize ?? 1024);
return encodeRaw(bcsWriter, data, typeParams, typeMap);
}