public static TightCapability Deserialize(Stream stream) { var reader = new Util.BinaryReader(stream); return(new TightCapability() { Code = reader.ReadInt32(), Vendor = reader.ReadString(4), Signature = reader.ReadString(8) }); }
public static ServerInit Deserialize(Util.BinaryReader reader) { var serverInit = new ServerInit() { FrameBufferWidth = reader.ReadUInt16(), FrameBufferHeight = reader.ReadUInt16(), PixelFormat = PixelFormat.Deserialize(reader) }; var nameSize = reader.ReadUInt32(); serverInit.Name = reader.ReadString((int)nameSize); return(serverInit); }