public void Write(BinaryWriter writer) { var v = new VarInt(Value.Length); v.Write(writer); writer.Write(Encoding.UTF8.GetBytes(Value)); }
public static VarString Read(BinaryReader reader, out UInt64 length) { length = VarInt.Read(reader).Value; return(new VarString(reader.ReadChars((int)length))); }