﻿using System.IO;

namespace FRoGCreator.Protocol.Network
{
    public static partial class NetworkMessageReceiver
    {
        public static INetworkMessage Deserialize(byte[] data)
        {
            int length = data.Length;
            var message = (INetworkMessage)NetworkMessageLoader.Model.Deserialize(new MemoryStream(data, 0, length), null, typeof(INetworkMessage));
            return message;
        }
    }
}
