public static void Serialize(string src, BinaryWriter writer) { BytesUtil.Serialize(Encoding.UTF8.GetBytes(src), writer); }
public static string Deserialize(BinaryReader reader) { var data = BytesUtil.Deserialize(reader); return(Encoding.UTF8.GetString(data, 0, data.Length)); }