/// <summary> /// Decompresses and deserializes a value of a given type from the given byte array in the given format /// </summary> /// <param name="bytes">The bytes to deserialize from</param> /// <param name="format">The format of deserialization</param> /// <param name="ctx">The context of a given deserialization session</param> /// <typeparam name="TResult"></typeparam> /// <returns></returns> public static TResult DeserializeValue <TResult>(byte[] bytes, DataFormat format, DeserializationContext ctx = null) => SerializationUtility.DeserializeValue <TResult>(OdinLZ4Engine.Decode(bytes), format, ctx);
/// <summary> /// Decompresses and deserializes a value of a given type from the given byte array in the given format, /// using the given list of Unity objects for external index reference resolution /// </summary> /// <param name="bytes">The bytes to deserialize from</param> /// <param name="format">The format of deserialization</param> /// <param name="referencedUnityObjects">The list of Unity objects to use for external index reference resolution</param> /// <param name="ctx">The context of a given deserialization session</param> /// <typeparam name="TResult"></typeparam> /// <returns></returns> public static TResult DeserializeValue <TResult>(byte[] bytes, DataFormat format, List <UnityEngine.Object> referencedUnityObjects, DeserializationContext ctx = null) => SerializationUtility.DeserializeValue <TResult>(OdinLZ4Engine.Decode(bytes), format, referencedUnityObjects, ctx);