serialize function
Implementation
ByteData serialize(String input) {
final inputBytes = utf8.encode(input);
final prefix = encodeVarUint(inputBytes.length);
return Uint8List.fromList(List.of(prefix.followedBy(inputBytes)))
.buffer
.asByteData();
}