public ReadBytes ( |
||
count | ||
return | byte[] |
public static string Deserialize(BitReader br) { var length = br.ReadInt32(); if (length > 0) { var bytes = br.ReadBytes(length); return Encoding.GetEncoding(1252).GetString(bytes, 0, length - 1); } else if (length < 0) { var bytes = br.ReadBytes(length * -2); return Encoding.Unicode.GetString(bytes, 0, (length * -2) - 2); } return ""; }
public static string Deserialize(BitReader br) { var length = br.ReadInt32(); if (length > 0) { var bytes = br.ReadBytes(length); return(Encoding.GetEncoding(1252).GetString(bytes, 0, length - 1)); } else if (length < 0) { var bytes = br.ReadBytes(length * -2); return(Encoding.Unicode.GetString(bytes, 0, (length * -2) - 2)); } return(""); }