public static object Deserialize(byte[] data, Type t)
 {
     if (t == null)
     {
         return(null);
     }
     if (((data != null) ? data.Length : 0) != 0)
     {
         if (t.IsEnum)
         {
             return(Enum.ToObject(t, BloxSerializer.ToInt(data)));
         }
         if (t.IsArray)
         {
             return(BloxSerializer.DeserializeArray(data, t));
         }
         if (t.IsGenericType)
         {
             if (t.GetGenericTypeDefinition() == typeof(List <>))
             {
                 return(BloxSerializer.DeserializeList(data, t));
             }
             return(new byte[0]);
         }
         if (BloxSerializer.readers.ContainsKey(t))
         {
             return(BloxSerializer.readers[t](data));
         }
         return(null);
     }
     return(BloxMemberInfo.GetDefaultValue(t));
 }