diff --git a/src/libraries/System.IO.Compression.Brotli/src/System/IO/Compression/dec/BrotliStream.Decompress.cs b/src/libraries/System.IO.Compression.Brotli/src/System/IO/Compression/dec/BrotliStream.Decompress.cs index 4ac6f784ef08bf..8350063cdb2680 100644 --- a/src/libraries/System.IO.Compression.Brotli/src/System/IO/Compression/dec/BrotliStream.Decompress.cs +++ b/src/libraries/System.IO.Compression.Brotli/src/System/IO/Compression/dec/BrotliStream.Decompress.cs @@ -96,7 +96,7 @@ public override int Read(Span buffer) /// Begins an asynchronous read operation. (Consider using the method instead.) /// The buffer from which data will be read. /// The byte offset in at which to begin reading data from the stream. - /// To maximum number of bytes to read. + /// The maximum number of bytes to read. /// An optional asynchronous callback, to be called when the read operation is complete. /// A user-provided object that distinguishes this particular asynchronous read request from other requests. /// An object that represents the asynchronous read operation, which could still be pending. diff --git a/src/libraries/System.IO.Compression.Brotli/src/System/IO/Compression/enc/BrotliStream.Compress.cs b/src/libraries/System.IO.Compression.Brotli/src/System/IO/Compression/enc/BrotliStream.Compress.cs index 50cd37b0b65d3f..71b240ebcbbe5b 100644 --- a/src/libraries/System.IO.Compression.Brotli/src/System/IO/Compression/enc/BrotliStream.Compress.cs +++ b/src/libraries/System.IO.Compression.Brotli/src/System/IO/Compression/enc/BrotliStream.Compress.cs @@ -125,6 +125,10 @@ public override void EndWrite(IAsyncResult asyncResult) => /// The maximum number of bytes to write. /// The token to monitor for cancellation requests. The default value is . /// A task that represents the asynchronous write operation. + /// is . + /// or is negative. + /// The sum of and is greater than the buffer length. + /// The write operation cannot be performed because the stream is closed. /// This method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in apps where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the and keywords in Visual Basic and C#. /// Use the property to determine whether the current instance supports writing. /// If the operation is canceled before it completes, the returned task contains the value for the property. diff --git a/src/libraries/System.IO.Compression/src/System/IO/Compression/CompressionMode.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/CompressionMode.cs index f14efbbc41c28f..14678b77092c8a 100644 --- a/src/libraries/System.IO.Compression/src/System/IO/Compression/CompressionMode.cs +++ b/src/libraries/System.IO.Compression/src/System/IO/Compression/CompressionMode.cs @@ -3,9 +3,15 @@ namespace System.IO.Compression { + /// + /// Specifies whether to compress or decompress the underlying stream. + /// public enum CompressionMode { + /// Decompresses the underlying stream. Decompress = 0, + + /// Compresses the underlying stream. Compress = 1 } } diff --git a/src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs index 4dd6b616f35bb6..d58bc5c641b119 100644 --- a/src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs +++ b/src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchiveEntry.cs @@ -214,6 +214,9 @@ internal ZipArchiveEntry(ZipArchive archive, string entryName) /// public ZipArchive Archive => _archive; + /// + /// Gets the CRC-32 checksum of the uncompressed entry data. + /// [CLSCompliant(false)] public uint Crc32 => _crc32; @@ -270,6 +273,12 @@ public long CompressedLength } } + /// + /// Gets or sets the external file attributes of the entry, whose meaning depends on the platform + /// that created the archive (for example, Unix file mode bits or Windows file attributes). + /// + /// The entry has been deleted from the archive. + /// The archive that the entry belongs to has been disposed. public int ExternalAttributes { get @@ -510,6 +519,28 @@ public Stream Open(FileAccess access) return OpenCore(access); } + /// + /// Opens the entry for reading or updating with the specified access mode and password. + /// This allows for more granular control over the returned stream's capabilities. + /// If the entry is not encrypted, the password is ignored and the entry is opened normally. + /// + /// The file access mode for the returned stream. + /// The password used to decrypt the entry. If the entry is not encrypted, this parameter is ignored. + /// A that represents the contents of the entry with the specified access capabilities. + /// + /// The allowed values depend on the : + /// + /// : Only is allowed. + /// : and are allowed (both write-only). + /// : All values are allowed. provides a read-only stream over the entry's current content, including any modifications made in the current session. discards existing content and provides an empty writable stream. loads existing content into memory (equivalent to ). + /// + /// + /// is not a valid value. + /// The entry is encrypted and is empty. + /// The requested access is not compatible with the archive's open mode. + /// The entry is already currently open for writing. -or- The entry has been deleted from the archive. -or- The archive that this entry belongs to was opened in ZipArchiveMode.Create, and this entry has already been written to once. + /// The entry is missing from the archive or is corrupt and cannot be read. -or- The entry has been compressed using a compression method that is not supported. + /// The ZipArchive that this entry belongs to has been disposed. public Stream Open(FileAccess access, ReadOnlySpan password) { ThrowIfInvalidArchive();