2 writes to _archiveStream
System.IO.Compression (2)
System\IO\Compression\ZipArchive.cs (2)
140_archiveStream = DecideArchiveStream(mode, stream); 184_archiveStream = archiveStream;
54 references to _archiveStream
System.IO.Compression (54)
System\IO\Compression\ZipArchive.Async.cs (21)
98if (zipArchive._archiveStream.Length == 0) 160await _archiveStream.DisposeAsync().ConfigureAwait(false); 173await _archiveStream.DisposeAsync().ConfigureAwait(false); 201int currBytesRead = await _archiveStream.ReadAtLeastAsync(fileBuffer, ZipCentralDirectoryFileHeader.BlockConstantSectionSize, throwOnEndOfStream: false, cancellationToken).ConfigureAwait(false); 209await ZipCentralDirectoryFileHeader.TryReadBlockAsync(sizedFileBuffer.AsMemory(currPosition), _archiveStream, saveExtraFieldsAndComments, cancellationToken).ConfigureAwait(false); 240_archiveStream.Seek(-ZipEndOfCentralDirectoryBlock.SizeOfBlockWithoutSignature, SeekOrigin.End); 244if (!await ZipHelper.SeekBackwardsToSignatureAsync(_archiveStream, 250long eocdStart = _archiveStream.Position; 253ZipEndOfCentralDirectoryBlock eocd = await ZipEndOfCentralDirectoryBlock.ReadBlockAsync(_archiveStream, cancellationToken).ConfigureAwait(false); 259if (_centralDirectoryStart > _archiveStream.Length) 296_archiveStream.Seek(eocdStart - Zip64EndOfCentralDirectoryLocator.SizeOfBlockWithoutSignature, SeekOrigin.Begin); 300if (await ZipHelper.SeekBackwardsToSignatureAsync(_archiveStream, 305Zip64EndOfCentralDirectoryLocator locator = await Zip64EndOfCentralDirectoryLocator.TryReadBlockAsync(_archiveStream, cancellationToken).ConfigureAwait(false); 309Zip64EndOfCentralDirectoryRecord record = await Zip64EndOfCentralDirectoryRecord.TryReadBlockAsync(_archiveStream, cancellationToken).ConfigureAwait(false); 378long plannedCentralDirectoryPosition = _archiveStream.Position; 392long sizeOfCentralDirectory = _archiveStream.Position - plannedCentralDirectoryPosition; 415long zip64EOCDRecordStart = _archiveStream.Position; 419await Zip64EndOfCentralDirectoryRecord.WriteBlockAsync(_archiveStream, _entries.Count, startOfCentralDirectory, sizeOfCentralDirectory, cancellationToken).ConfigureAwait(false); 420await Zip64EndOfCentralDirectoryLocator.WriteBlockAsync(_archiveStream, zip64EOCDRecordStart, cancellationToken).ConfigureAwait(false); 431await ZipEndOfCentralDirectoryBlock.WriteBlockAsync(_archiveStream, _entries.Count, startOfCentralDirectory, sizeOfCentralDirectory, _archiveComment, cancellationToken).ConfigureAwait(false); 435_archiveStream.Seek(ZipEndOfCentralDirectoryBlock.TotalSize + _archiveComment.Length, SeekOrigin.Current);
System\IO\Compression\ZipArchive.cs (33)
153if (_archiveStream.Length == 0) 342internal Stream ArchiveStream => _archiveStream; 456_archiveStream.Dispose(); 465_archiveStream.Dispose(); 486_archiveStream.Seek(_centralDirectoryStart, SeekOrigin.Begin); 531_archiveStream.Seek(-(sizedFileBuffer.Length - currPosition), SeekOrigin.Current); 563int currBytesRead = _archiveStream.ReadAtLeast(fileBufferSpan, ZipCentralDirectoryFileHeader.BlockConstantSectionSize, throwOnEndOfStream: false); 570bool result = ZipCentralDirectoryFileHeader.TryReadBlock(sizedFileBuffer.Slice(currPosition), _archiveStream, 616_archiveStream.Seek(-ZipEndOfCentralDirectoryBlock.SizeOfBlockWithoutSignature, SeekOrigin.End); 620if (!ZipHelper.SeekBackwardsToSignature(_archiveStream, 625long eocdStart = _archiveStream.Position; 628ZipEndOfCentralDirectoryBlock eocd = ZipEndOfCentralDirectoryBlock.ReadBlock(_archiveStream); 634if (_centralDirectoryStart > _archiveStream.Length) 656if (zip64EOCDOffset < 0 || zip64EOCDOffset > _archiveStream.Length) 659_archiveStream.Seek(zip64EOCDOffset, SeekOrigin.Begin); 699_archiveStream.Seek(eocdStart - Zip64EndOfCentralDirectoryLocator.SizeOfBlockWithoutSignature, SeekOrigin.Begin); 703if (ZipHelper.SeekBackwardsToSignature(_archiveStream, 708Zip64EndOfCentralDirectoryLocator locator = Zip64EndOfCentralDirectoryLocator.TryReadBlock(_archiveStream); 712Zip64EndOfCentralDirectoryRecord record = Zip64EndOfCentralDirectoryRecord.TryReadBlock(_archiveStream); 753_archiveStream.Seek(startingOffset, SeekOrigin.Begin); 760if (_mode == ZipArchiveMode.Update && _archiveStream.Position != _archiveStream.Length) 762_archiveStream.SetLength(_archiveStream.Position); 825long plannedCentralDirectoryPosition = _archiveStream.Position; 839long sizeOfCentralDirectory = _archiveStream.Position - plannedCentralDirectoryPosition; 848_archiveStream.Seek(Zip64EndOfCentralDirectoryRecord.TotalSize, SeekOrigin.Current); 849_archiveStream.Seek(Zip64EndOfCentralDirectoryLocator.TotalSize, SeekOrigin.Current); 866long zip64EOCDRecordStart = _archiveStream.Position; 870Zip64EndOfCentralDirectoryRecord.WriteBlock(_archiveStream, _entries.Count, startOfCentralDirectory, sizeOfCentralDirectory); 871Zip64EndOfCentralDirectoryLocator.WriteBlock(_archiveStream, zip64EOCDRecordStart); 882ZipEndOfCentralDirectoryBlock.WriteBlock(_archiveStream, _entries.Count, startOfCentralDirectory, sizeOfCentralDirectory, _archiveComment); 886_archiveStream.Seek(ZipEndOfCentralDirectoryBlock.TotalSize + _archiveComment.Length, SeekOrigin.Current);