public OpenSim.Region.Framework.Scenes.CoalescedObject DeserializeObjectFromBytes(byte[] bytes)
 {
     using (MemoryStream ms = new MemoryStream(bytes))
     {
         Serialization.CoalescedObjectSnapshot snap = ProtoBuf.Serializer.Deserialize <Serialization.CoalescedObjectSnapshot>(ms);
         return(snap.ToCoalescedObject());
     }
 }
Exemple #2
0
        public OpenSim.Region.Framework.Scenes.CoalescedObject DeserializeCoalescedObjFromInventoryBytes(byte[] bytes)
        {
            this.CheckHeader(bytes, HeaderTestFlag.CheckValidCoalesced | HeaderTestFlag.ThrowOnFailedCheck);

            //we should be able to proceed
            Serialization.CoalescedObjectSnapshot snap = Serialization.CoalescedObjectSnapshot.FromBytes(bytes, GROUP_HEADER.Length);

            return(snap.ToCoalescedObject());
        }