Esempio n. 1
0
        public virtual async ValueTask <bool> ParseCheckpointHeader(CustomBinaryReaderAsync binaryReader)
        {
            string id = await binaryReader.ReadStringAsync();

            string group = await binaryReader.ReadStringAsync();

            string metadata = await binaryReader.ReadStringAsync();

            uint time1 = await binaryReader.ReadUInt32Async();

            uint time2 = await binaryReader.ReadUInt32Async();

            int eventSizeInBytes = await binaryReader.ReadInt32Async();

            using (IMemoryOwner <byte> uncompressed = await binaryReader.UncompressData())
            {
                return(ParseCheckpointContent(new MemoryReader(uncompressed.Memory, Endianness.Native), id, group, metadata, time1, time2));
            }
        }
Esempio n. 2
0
        public virtual async ValueTask <bool> ParseReplayDataChunkHeader(CustomBinaryReaderAsync chunkReader)
        {
            uint time1 = uint.MaxValue;
            uint time2 = uint.MaxValue;

            if (ReplayHeader !.FileVersion >= ReplayVersionHistory.streamChunkTimes)
            {
                time1 = await chunkReader.ReadUInt32Async();

                time2 = await chunkReader.ReadUInt32Async();

                int replaySizeInBytes = await chunkReader.ReadInt32Async();
            }
            using (IMemoryOwner <byte> uncompressedData = await chunkReader.UncompressData())//TODO: check compress
            {
                //return ParseReplayData( new MemoryReader( uncompressedData.Memory, Endianness.Native ));
            }
            return(true);
        }