protected async Task<int> ProcessUncompressedBulkData(ByteArrayReader reader, BulkDataCompressionTypes compressionFlags) { DomainCompressedChunkBulkData compressedChunk = new DomainCompressedChunkBulkData(); CompressedChunks.Add(compressedChunk); int builderSize = await compressedChunk.BuildCompressedChunk(reader, compressionFlags); return builderSize; }
protected async Task ProcessCompressedBulkData(ByteArrayReader reader, Func<DomainCompressedChunkBulkData, Task> chunkHandler) { DomainCompressedChunkBulkData compressedChunk = new DomainCompressedChunkBulkData(); // CompressedChunks.Add(compressedChunk); await compressedChunk.ReadCompressedChunk(reader); await chunkHandler(compressedChunk); }