コード例 #1
0
 public DecompressOperationExecutor(IThreadPool threadPool, IBufferPool bufferPool, IBlockStreamWriter blockStreamWriter, ILogger logger)
 {
     this.threadPool        = threadPool;
     this.bufferPool        = bufferPool;
     this.blockStreamWriter = blockStreamWriter;
     this.logger            = logger;
 }
コード例 #2
0
        public MultithreadFileDecompressor(IBlockDecompressor blockDecompressor, IBlockStreamWriter blockWriter, IBlockStreamReader blockReader,
                                           int threadsCount = 15)
        {
            _blockDecompressor = blockDecompressor;
            _blockReader       = blockReader;
            _blockWriter       = blockWriter;
            _threadsCount      = threadsCount;

            _readedBlocks       = new ConcurrentBlockStack();
            _decompressedBlocks = new ConcurrentBlockStack();
        }
コード例 #3
0
        public MultithreadFileCompressor(IBlockCompressor blockCompressor, IBlockStreamWriter blockWriter, IBlockStreamReader blockReader,
                                         int threadsCount = 15, int blockLen = (1024 * 1024) *10)
        {
            _blockCompressor = blockCompressor;
            _blockReader     = blockReader;
            _blockWriter     = blockWriter;
            _blockLen        = blockLen;
            _threadsCount    = threadsCount;

            _currentReadIndex = 0;
            _readedBlocks     = new ConcurrentBlockStack();
            _compressedBlocks = new ConcurrentBlockStack();
        }