public static void writeType(bin.IWriter w, string v) { if (v == null || v.Length == 0) { writeDynSize(w, 0); } else { byte[] str = Encoding.UTF8.GetBytes(v); uint len = (uint)str.Length; writeDynSize(w, len); if (len > 0) { w.write(str); } } }
public static void writeType(bin.IWriter w, byte[] d) { w.write(d); }
public static void writeType(bin.IWriter w, byte v) { w.write(new byte[1] { v }); }
public static void writeType(bin.IWriter w, ushort v) { w.write(BitConverter.GetBytes(v)); }