BuildCompressedChunkHeader() public method

public BuildCompressedChunkHeader ( ByteArrayReader reader, uint flags ) : Task
reader UpkManager.Domain.Helpers.ByteArrayReader
flags uint
return Task
Exemplo n.º 1
0
        public async Task <int> BuildCompressedChunk(ByteArrayReader reader, BulkDataCompressionTypes compressionFlags)
        {
            BulkDataFlags = (uint)compressionFlags;

            int builderSize = sizeof(uint)
                              + sizeof(int) * 3;

            if ((compressionFlags & NothingToDo) > 0)
            {
                return(builderSize);
            }

            reader.Seek(0);

            UncompressedSize = reader.Remaining;

            Header = new DomainCompressedChunkHeader();

            builderSize += await Header.BuildCompressedChunkHeader(reader, BulkDataFlags);

            CompressedSize = builderSize - 16;

            return(builderSize);
        }
    public async Task<int> BuildCompressedChunk(ByteArrayReader reader, BulkDataCompressionTypes compressionFlags) {
      BulkDataFlags = (uint)compressionFlags;

      int builderSize = sizeof(uint)
                      + sizeof(int) * 3;

      if ((compressionFlags & NothingToDo) > 0) return builderSize;

      reader.Seek(0);

      UncompressedSize = reader.Remaining;

      Header = new DomainCompressedChunkHeader();

      builderSize += await Header.BuildCompressedChunkHeader(reader, BulkDataFlags);

      CompressedSize = builderSize - 16;

      return builderSize;
    }