private static async Task<Stream> ReceiveData(TransferHandle state, ICompressionProvider compression) { var context = await new AsyncSocketWriterReader(state.ClientSocket, state.BufferSize) .ReadAsync(); return compression.DecompressFrom(context.ReceivedData); }