You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.IO.Compression/ZipArchive.xml
+28-27Lines changed: 28 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -385,55 +385,56 @@ If the comment byte length is larger than <xref:System.UInt16.MaxValue>, it will
385
385
</Parameters>
386
386
<Docs>
387
387
<paramname="stream">The input or output stream.</param>
388
-
<paramname="mode">See the description of the ZipArchiveMode enum. Read requires the stream to support reading, Create requires the stream to support writing, and Update requires the stream to support reading, writing, and seeking.</param>
388
+
<paramname="mode">One of the enumeration values that specifies whether the stream supports reading, writing, and seeking.</param>
389
389
<paramname="leaveOpen">
390
390
<seelangword="true" /> to leave the stream open upon disposing the ZipArchive, otherwise <seelangword="false" />.</param>
391
391
<paramname="entryNameEncoding">
392
-
<para>The encoding to use when reading or writing entry names and comments in this ZipArchive.</para>
393
-
<para>NOTE: Specifying this parameter to values other than <seelangword="null" /> is discouraged.</para>
394
-
<para>However, this may be necessary for interoperability with ZIP archive tools and libraries that do not correctly support UTF-8 encoding for entry names.<br /> This value is used as follows:</para>
392
+
The encoding to use when reading or writing entry names and comments in this ZipArchive.
393
+
</param>
394
+
<paramname="cancellationToken">The optional cancellation token to monitor.</param>
395
+
<summary>Asynchronously initializes and returns a new instance of <seecref="T:System.IO.Compression.ZipArchive" /> on the given stream in the specified mode, specifying whether to leave the stream open, with an optional encoding and an optional cancellation token.</summary>
396
+
<returns>To be added.</returns>
397
+
<remarks>
398
+
<para>Specifying a value for <paramrefname="entryNameEncoding" /> other than <seelangword="null" /> is discouraged. However, this might be necessary for interoperability with ZIP archive tools and libraries that don't correctly support UTF-8 encoding for entry names.</para>
399
+
<para>This value is used as follows:</para>
395
400
<para><strong>Reading (opening) ZIP archive files:</strong></para>
396
-
<para>If <c>entryNameEncoding</c> is not specified (<c>== null</c>):</para>
401
+
<para>If <paramrefname="entryNameEncoding" /> is not specified (<c>== null</c>):</para>
397
402
<list>
398
-
<item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header is <em>not</em> set, use the current system default code page (<c>Encoding.Default</c>) in order to decode the entry name and comment.</item>
399
-
<item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header <em>is</em> set, use UTF-8 (<c>Encoding.UTF8</c>) in order to decode the entry name and comment.</item>
403
+
<item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header is <em>not</em> set, use the current system default code page (<c>Encoding.Default</c>) to decode the entry name and comment.</item>
404
+
<item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header <em>is</em> set, use UTF-8 (<c>Encoding.UTF8</c>) to decode the entry name and comment.</item>
400
405
</list>
401
-
<para>If <c>entryNameEncoding</c> is specified (<c>!= null</c>):</para>
406
+
<para>If <paramrefname="entryNameEncoding" /> is specified (<c>!= null</c>):</para>
402
407
<list>
403
-
<item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header is <em>not</em> set, use the specified <c>entryNameEncoding</c> in order to decode the entry name and comment.</item>
404
-
<item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header <em>is</em> set, use UTF-8 (<c>Encoding.UTF8</c>) in order to decode the entry name and comment.</item>
408
+
<item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header is <em>not</em> set, use the specified <paramrefname="entryNameEncoding" /> to decode the entry name and comment.</item>
409
+
<item>For entries where the language encoding flag (EFS) in the general purpose bit flag of the local file header <em>is</em> set, use UTF-8 (<c>Encoding.UTF8</c>) to decode the entry name and comment.</item>
405
410
</list>
406
411
<para><strong>Writing (saving) ZIP archive files:</strong> </para>
407
-
<para>If <c>entryNameEncoding</c> is not specified (<c>== null</c>):</para>
412
+
<para>If <paramrefname="entryNameEncoding" /> is not specified (<c>== null</c>):</para>
408
413
<list>
409
-
<item>For entry names and comments that contain characters outside the ASCII range, the language encoding flag (EFS) will be set in the general purpose bit flag of the local file header, and UTF-8 (<c>Encoding.UTF8</c>) will be used in order to encode the entry name and comment into bytes.</item>
410
-
<item>For entry names and comments that do not contain characters outside the ASCII range, the language encoding flag (EFS) will not be set in the general purpose bit flag of the local file header, and the current system default code page (<c>Encoding.Default</c>) will be used to encode the entry names and comments into bytes.</item>
414
+
<item>For entry names and comments that contain characters outside the ASCII range, the language encoding flag (EFS) will be set in the general purpose bit flag of the local file header, and UTF-8 (<c>Encoding.UTF8</c>) will be used to encode the entry name and comment into bytes.</item>
415
+
<item>For entry names and comments that don't contain characters outside the ASCII range, the language encoding flag (EFS) will not be set in the general purpose bit flag of the local file header, and the current system default code page (<c>Encoding.Default</c>) will be used to encode the entry names and comments into bytes.</item>
411
416
</list>
412
-
<para>If <c>entryNameEncoding</c> is specified (<c>!= null</c>):</para>
417
+
<para>If <paramrefname="entryNameEncoding" /> is specified (<c>!= null</c>):</para>
413
418
<list>
414
-
<item>The specified <c>entryNameEncoding</c> will always be used to encode the entry names and comments into bytes.</item>
419
+
<item>The specified <paramrefname="entryNameEncoding" /> will always be used to encode the entry names and comments into bytes.</item>
415
420
</list>
416
-
<para>The language encoding flag (EFS) in the general purpose bit flag of the local file header will be set if and only if the specified <c>entryNameEncoding</c> is a UTF-8 encoding.</para>
417
-
</param>
418
-
<paramname="cancellationToken">The optional cancellation token to monitor.</param>
419
-
<summary>Asynchronously initializes and returns a new instance of <seecref="T:System.IO.Compression.ZipArchive" /> on the given stream in the specified mode, specifying whether to leave the stream open, with an optional encoding and an optional cancellation token.</summary>
420
-
<returns>To be added.</returns>
421
-
<remarks>To be added.</remarks>
421
+
<para>The language encoding flag (EFS) in the general purpose bit flag of the local file header will be set if and only if the specified <paramrefname="entryNameEncoding" /> is a UTF-8 encoding.</para>
422
+
</remarks>
422
423
<exceptioncref="T:System.ArgumentException">
423
424
<para>The stream is already closed.</para>
424
425
<para>-or-</para>
425
-
<para>mode is incompatible with the capabilities of the stream.</para>
426
+
<para><paramrefname="mode" /> is incompatible with the capabilities of the stream.</para>
426
427
</exception>
427
428
<exceptioncref="T:System.ArgumentNullException">The stream is <seelangword="null" />.</exception>
428
-
<exceptioncref="T:System.ArgumentOutOfRangeException">mode specified an invalid value.</exception>
429
+
<exceptioncref="T:System.ArgumentOutOfRangeException"><paramrefname="mode" /> specified an invalid value.</exception>
0 commit comments