Repository: dotnet/runtime
File: src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs (C#)

Code before:
            }

            _currentlyOpenForWrite = true;

            if (loadExistingContent)
            {
                _storedUncompressedData = GetUncompressedData();
            }
            else
            {
                _storedUncompressedData?.Dispose();
                _storedUncompressedData = new MemoryStream();
                // Opening with loadExistingContent: false discards existing content, which is a modification
                MarkAsModified();
            }

            _storedUncompressedData.Seek(0, SeekOrigin.Begin);

            return new WrappedStream(_storedUncompressedData, this,
                onClosed: thisRef => thisRef!._currentlyOpenForWrite = false,
                notifyEntryOnWrite: true);
        }

        /// <summary>
        /// Marks this entry as modified, indicating that its data has changed and needs to be rewritten.
        /// </summary>
        /// <summary>
        /// Marks this entry as modified, indicating that its data has changed and needs to be rewritten.
        /// </summary>
        internal void MarkAsModified()
        {
            _everOpenedForWrite = true;
            Changes |= ZipArchive.ChangeState.StoredData;

            // Normalize compression method when actually modifying - Deflate64 data will be
            // re-compressed as Deflate since we don't support writing Deflate64.
            if (CompressionMethod != ZipCompressionMethod.Stored)
            {
                CompressionMethod = ZipCompressionMethod.Deflate;
            }
        }

        private bool IsOpenable(bool needToUncompress, bool needToLoadIntoMemory, out string? message)
        {
            message = null;

            if (_originallyInArchive)
            {
                if (!IsOpenableInitialVerifications(needToUncompress, out message))
                {
                    return false;

Review comment (suggestion):
There are two consecutive `<summary>` XML doc blocks above `MarkAsModified()`. This duplication is likely accidental and should be reduced to a single `<summary>` to avoid confusing generated docs / analyzers.
```suggestion

```

Code after:
            }

            _currentlyOpenForWrite = true;

            if (loadExistingContent)
            {
                _storedUncompressedData = GetUncompressedData();
            }
            else
            {
                _storedUncompressedData?.Dispose();
                _storedUncompressedData = new MemoryStream();
                // Opening with loadExistingContent: false discards existing content, which is a modification
                MarkAsModified();
            }

            _storedUncompressedData.Seek(0, SeekOrigin.Begin);

            return new WrappedStream(_storedUncompressedData, this,
                onClosed: thisRef => thisRef!._currentlyOpenForWrite = false,
                notifyEntryOnWrite: true);
        }

        /// <summary>
        /// Marks this entry as modified, indicating that its data has changed and needs to be rewritten.
        /// </summary>
        internal void MarkAsModified()
        {
            _everOpenedForWrite = true;
            Changes |= ZipArchive.ChangeState.StoredData;

            // Normalize compression method when actually modifying - Deflate64 data will be
            // re-compressed as Deflate since we don't support writing Deflate64.
            if (CompressionMethod != ZipCompressionMethod.Stored)
            {
                CompressionMethod = ZipCompressionMethod.Deflate;
            }
        }

        private bool IsOpenable(bool needToUncompress, bool needToLoadIntoMemory, out string? message)
        {
            message = null;

            if (_originallyInArchive)
            {
                if (!IsOpenableInitialVerifications(needToUncompress, out message))
                {
                    return false;
                }
                if (!ZipLocalFileHeader.TrySkipBlock(_archive.ArchiveStream))
                {