public void Act(string archiveName, string fileName, out Stream file, out GZipStream gzipStream)
 {
     file = new ParallelFileWriter(fileName);
     gzipStream = GZipStreamInitiializer.Initializer(CompressionMode.Decompress, archiveName);
     int bytesRead;
     var buffer = new byte[_blockLenght];
     do
     {
         bytesRead = gzipStream.Read(buffer, 0, _blockLenght);
         file.Write(buffer, 0, bytesRead);
     } while (bytesRead != 0);
 }
Exemplo n.º 2
0
        public void Act(string archiveName, string fileName, out Stream file, out GZipStream gzipStream)
        {
            file       = new ParallelFileWriter(fileName);
            gzipStream = GZipStreamInitiializer.Initializer(CompressionMode.Decompress, archiveName);
            int bytesRead;
            var buffer = new byte[_blockLenght];

            do
            {
                bytesRead = gzipStream.Read(buffer, 0, _blockLenght);
                file.Write(buffer, 0, bytesRead);
            } while (bytesRead != 0);
        }
Exemplo n.º 3
0
        public GZipStream InitStream(string fileName)
        {
            Stream file = new ParallelFileWriter(fileName);

            return(new GZipStream(file, CompressionMode.Compress));
        }
 public GZipStream InitStream(string fileName)
 {
     Stream file = new ParallelFileWriter(fileName);
     return new GZipStream(file, CompressionMode.Compress);
 }