Skip to content

Commit 8022d8a

Browse files
Port System.IO.Compression docs from RC1 (#10485)
* Port System.IO.Compression docs from RC1 * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> --------- Co-authored-by: Genevieve Warren <[email protected]>
1 parent f985b66 commit 8022d8a

File tree

7 files changed

+55
-31
lines changed

7 files changed

+55
-31
lines changed

xml/System.IO.Compression/BrotliCompressionOptions.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</Base>
1515
<Interfaces />
1616
<Docs>
17-
<summary>To be added.</summary>
17+
<summary>Provides compression options to be used with <see cref="T:System.IO.Compression.BrotliStream" />.</summary>
1818
<remarks>To be added.</remarks>
1919
</Docs>
2020
<Members>
@@ -51,9 +51,10 @@
5151
<ReturnType>System.Int32</ReturnType>
5252
</ReturnValue>
5353
<Docs>
54-
<summary>To be added.</summary>
55-
<value>To be added.</value>
56-
<remarks>To be added.</remarks>
54+
<summary>Gets or sets the compression quality for a Brotli compression stream.</summary>
55+
<value>The compression quality for a Brotli compression stream. The default value is 4.</value>
56+
<remarks>The higher the quality, the slower the compression. The range is from 0 to 11.</remarks>
57+
<exception cref="T:System.ArgumentOutOfRangeException">The value is less than 0 or greater than 11.</exception>
5758
</Docs>
5859
</Member>
5960
</Members>

xml/System.IO.Compression/BrotliStream.xml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
<summary>Initializes a new instance of the <see cref="T:System.IO.Compression.BrotliStream" /> class by using the specified stream and compression level.</summary>
7878
<remarks>To be added.</remarks>
7979
<exception cref="T:System.ArgumentException">.NET 7 and later: <paramref name="compressionLevel" /> is not defined in the <see cref="System.IO.Compression.CompressionLevel" /> enumeration.</exception>
80+
<exception cref="T:System.ArgumentNullException">
81+
<paramref name="stream" /> is <see langword="null" />.</exception>
8082
</Docs>
8183
</Member>
8284
<Member MemberName=".ctor">
@@ -132,11 +134,14 @@
132134
<Parameter Name="leaveOpen" Type="System.Boolean" Index="2" FrameworkAlternate="net-9.0" />
133135
</Parameters>
134136
<Docs>
135-
<param name="stream">To be added.</param>
136-
<param name="compressionOptions">To be added.</param>
137-
<param name="leaveOpen">To be added.</param>
138-
<summary>To be added.</summary>
137+
<param name="stream">The stream to which compressed data is written.</param>
138+
<param name="compressionOptions">The Brotli options for fine tuning the compression stream.</param>
139+
<param name="leaveOpen">
140+
<see langword="true" /> to leave the stream open after disposing the <see cref="T:System.IO.Compression.BrotliStream" /> object; otherwise, <see langword="false" />.</param>
141+
<summary>Initializes a new instance of the <see cref="T:System.IO.Compression.BrotliStream" /> class by using the specified stream and compression options, and optionally leaves the stream open.</summary>
139142
<remarks>To be added.</remarks>
143+
<exception cref="T:System.ArgumentNullException">
144+
<paramref name="stream" /> or <paramref name="compressionOptions" /> is <see langword="null" />.</exception>
140145
</Docs>
141146
</Member>
142147
<Member MemberName=".ctor">
@@ -174,6 +179,8 @@
174179
<summary>Initializes a new instance of the <see cref="T:System.IO.Compression.BrotliStream" /> class by using the specified stream and compression level, and optionally leaves the stream open.</summary>
175180
<remarks>To be added.</remarks>
176181
<exception cref="T:System.ArgumentException">.NET 7 and later: <paramref name="compressionLevel" /> is not defined in the <see cref="System.IO.Compression.CompressionLevel" /> enumeration.</exception>
182+
<exception cref="T:System.ArgumentNullException">
183+
<paramref name="stream" /> is <see langword="null" />.</exception>
177184
</Docs>
178185
</Member>
179186
<Member MemberName=".ctor">

xml/System.IO.Compression/DeflateStream.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,14 @@ You use this constructor when you want to specify whether compression efficiency
362362
<Parameter Name="leaveOpen" Type="System.Boolean" Index="2" FrameworkAlternate="net-9.0" />
363363
</Parameters>
364364
<Docs>
365-
<param name="stream">To be added.</param>
366-
<param name="compressionOptions">To be added.</param>
367-
<param name="leaveOpen">To be added.</param>
368-
<summary>To be added.</summary>
365+
<param name="stream">The stream to which compressed data is written.</param>
366+
<param name="compressionOptions">The options for fine tuning the compression stream.</param>
367+
<param name="leaveOpen">
368+
<see langword="true" /> to leave the stream object open after disposing the <see cref="T:System.IO.Compression.DeflateStream" /> object; otherwise, <see langword="false" /></param>
369+
<summary>Initializes a new instance of the <see cref="T:System.IO.Compression.DeflateStream" /> class by using the specified stream, compression options, and optionally leaves the stream open.</summary>
369370
<remarks>To be added.</remarks>
371+
<exception cref="T:System.ArgumentNullException">
372+
<paramref name="stream" /> or <paramref name="compressionOptions" /> is <see langword="null" />.</exception>
370373
</Docs>
371374
</Member>
372375
<Member MemberName="BaseStream">

xml/System.IO.Compression/GZipStream.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,11 +387,14 @@ By default, the compression level is set to <xref:System.IO.Compression.Compress
387387
<Parameter Name="leaveOpen" Type="System.Boolean" Index="2" FrameworkAlternate="net-9.0" />
388388
</Parameters>
389389
<Docs>
390-
<param name="stream">To be added.</param>
391-
<param name="compressionOptions">To be added.</param>
392-
<param name="leaveOpen">To be added.</param>
393-
<summary>To be added.</summary>
390+
<param name="stream">The stream to which compressed data is written.</param>
391+
<param name="compressionOptions">The options for fine tuning the compression stream.</param>
392+
<param name="leaveOpen">
393+
<see langword="true" /> to leave the stream object open after disposing the <see cref="T:System.IO.Compression.GZipStream" /> object; otherwise, <see langword="false" />.</param>
394+
<summary>Initializes a new instance of the <see cref="T:System.IO.Compression.GZipStream" /> class by using the specified stream, compression options, and optionally leaves the stream open.</summary>
394395
<remarks>To be added.</remarks>
396+
<exception cref="T:System.ArgumentNullException">
397+
<paramref name="stream" /> or <paramref name="compressionOptions" /> is <see langword="null" />.</exception>
395398
</Docs>
396399
</Member>
397400
<Member MemberName="BaseStream">

xml/System.IO.Compression/ZLibCompressionOptions.xml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</Base>
1515
<Interfaces />
1616
<Docs>
17-
<summary>To be added.</summary>
17+
<summary>Provides compression options to be used with <see cref="T:System.IO.Compression.ZLibStream" />, <see cref="T:System.IO.Compression.DeflateStream" />, and <see cref="T:System.IO.Compression.GZipStream" />.</summary>
1818
<remarks>To be added.</remarks>
1919
</Docs>
2020
<Members>
@@ -51,9 +51,13 @@
5151
<ReturnType>System.Int32</ReturnType>
5252
</ReturnValue>
5353
<Docs>
54-
<summary>To be added.</summary>
55-
<value>To be added.</value>
56-
<remarks>To be added.</remarks>
54+
<summary>Gets or sets the compression level for a compression stream.</summary>
55+
<value>The compression level for a compression stream. The default value is -1.</value>
56+
<remarks>
57+
<para>Can accept any value between -1 and 9 (inclusive). 0 gives no compression, 1 gives best speed, 9 gives best compression,</para>
58+
<para>and -1 requests the default compression level, which is equivalent to 6.</para>
59+
</remarks>
60+
<exception cref="T:System.ArgumentOutOfRangeException">The value is less than -1 or greater than 9.</exception>
5761
</Docs>
5862
</Member>
5963
<Member MemberName="CompressionStrategy">
@@ -72,9 +76,10 @@
7276
<ReturnType>System.IO.Compression.ZLibCompressionStrategy</ReturnType>
7377
</ReturnValue>
7478
<Docs>
75-
<summary>To be added.</summary>
79+
<summary>Gets or sets the compression algorithm for a compression stream.</summary>
7680
<value>To be added.</value>
7781
<remarks>To be added.</remarks>
82+
<exception cref="T:System.ArgumentOutOfRangeException">The value is not a valid <see cref="T:System.IO.Compression.ZLibCompressionStrategy" /> value.</exception>
7883
</Docs>
7984
</Member>
8085
</Members>

xml/System.IO.Compression/ZLibCompressionStrategy.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<BaseTypeName>System.Enum</BaseTypeName>
1414
</Base>
1515
<Docs>
16-
<summary>To be added.</summary>
16+
<summary>Defines the compression algorithms that can be used for <see cref="T:System.IO.Compression.DeflateStream" />, <see cref="T:System.IO.Compression.GZipStream" />, and <see cref="T:System.IO.Compression.ZLibStream" />.</summary>
1717
<remarks>To be added.</remarks>
1818
</Docs>
1919
<Members>
@@ -34,7 +34,7 @@
3434
</ReturnValue>
3535
<MemberValue>0</MemberValue>
3636
<Docs>
37-
<summary>To be added.</summary>
37+
<summary>Used for normal data.</summary>
3838
</Docs>
3939
</Member>
4040
<Member MemberName="Filtered">
@@ -54,7 +54,9 @@
5454
</ReturnValue>
5555
<MemberValue>1</MemberValue>
5656
<Docs>
57-
<summary>To be added.</summary>
57+
<summary>
58+
<para>Used for data produced by a filter (or predictor). The effect of Filtered is to force more Huffman coding and less string matching; it's an intermediate between Default and HuffmanOnly.</para>
59+
</summary>
5860
</Docs>
5961
</Member>
6062
<Member MemberName="Fixed">
@@ -74,7 +76,7 @@
7476
</ReturnValue>
7577
<MemberValue>4</MemberValue>
7678
<Docs>
77-
<summary>To be added.</summary>
79+
<summary>Prevents the use of dynamic Huffman codes, allowing for a simpler decoder for special applications.</summary>
7880
</Docs>
7981
</Member>
8082
<Member MemberName="HuffmanOnly">
@@ -94,7 +96,7 @@
9496
</ReturnValue>
9597
<MemberValue>2</MemberValue>
9698
<Docs>
97-
<summary>To be added.</summary>
99+
<summary>Used to force Huffman encoding only (no string match).</summary>
98100
</Docs>
99101
</Member>
100102
<Member MemberName="RunLengthEncoding">
@@ -114,7 +116,7 @@
114116
</ReturnValue>
115117
<MemberValue>3</MemberValue>
116118
<Docs>
117-
<summary>To be added.</summary>
119+
<summary>Used to limit match distances to one (run-length encoding). Gives better compression for PNG image data.</summary>
118120
</Docs>
119121
</Member>
120122
</Members>

xml/System.IO.Compression/ZLibStream.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,14 @@
158158
<Parameter Name="leaveOpen" Type="System.Boolean" Index="2" FrameworkAlternate="net-9.0" />
159159
</Parameters>
160160
<Docs>
161-
<param name="stream">To be added.</param>
162-
<param name="compressionOptions">To be added.</param>
163-
<param name="leaveOpen">To be added.</param>
164-
<summary>To be added.</summary>
161+
<param name="stream">The stream to which compressed data is written.</param>
162+
<param name="compressionOptions">The ZLib options for fine tuning the compression stream.</param>
163+
<param name="leaveOpen">
164+
<see langword="true" /> to leave the stream object open after disposing the <see cref="T:System.IO.Compression.ZLibStream" /> object; otherwise, <see langword="false" />.</param>
165+
<summary>Initializes a new instance of the <see cref="T:System.IO.Compression.ZLibStream" /> class by using the specified stream and compression options, and optionally leaves the stream open.</summary>
165166
<remarks>To be added.</remarks>
167+
<exception cref="T:System.ArgumentNullException">
168+
<paramref name="stream" /> or <paramref name="compressionOptions" /> is <see langword="null" />.</exception>
166169
</Docs>
167170
</Member>
168171
<Member MemberName="BaseStream">

0 commit comments

Comments
 (0)