Skip to content

Commit 71e9068

Browse files
carlossanloptdykstra
authored andcommitted
Document System.IO.Compression.Brotli.BrotliDecoder (#3379)
1 parent 82fdea7 commit 71e9068

File tree

1 file changed

+35
-15
lines changed

1 file changed

+35
-15
lines changed

xml/System.IO.Compression/BrotliDecoder.xml

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</Interface>
2323
</Interfaces>
2424
<Docs>
25-
<summary>To be added.</summary>
25+
<summary>Provides non-allocating, performant Brotli decompression methods. The methods decompress in a single pass without using a <see cref="T:System.IO.Compression.Brotli.BrotliStream" /> instance.</summary>
2626
<remarks>To be added.</remarks>
2727
</Docs>
2828
<Members>
@@ -52,13 +52,25 @@
5252
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" />
5353
</Parameters>
5454
<Docs>
55-
<param name="source">To be added.</param>
56-
<param name="destination">To be added.</param>
57-
<param name="bytesConsumed">To be added.</param>
58-
<param name="bytesWritten">To be added.</param>
59-
<summary>To be added.</summary>
60-
<returns>To be added.</returns>
61-
<remarks>To be added.</remarks>
55+
<param name="source">A buffer containing the compressed data.</param>
56+
<param name="destination">When this method returns, a byte span containing the decompressed data.</param>
57+
<param name="bytesConsumed">The total number of bytes that were read from <paramref name="source" />.</param>
58+
<param name="bytesWritten">The total number of bytes that were written in the <paramref name="destination" />.</param>
59+
<summary>Decompresses data that was compressed using the Brotli algorithm.</summary>
60+
<returns>One of the enumeration values that indicates the status of the decompression operation.</returns>
61+
<remarks>
62+
<format type="text/markdown"><![CDATA[
63+
64+
## Remarks
65+
66+
The return value can be as follows:
67+
- <xref:System.Buffers.OperationStatus.Done?displayProperty=nameWithType>: `source` was successfully and completely decompressed into `destination`.
68+
- <xref:System.Buffers.OperationStatus.DestinationTooSmall?displayProperty=nameWithType>: There is not enough space in `destination` to decompress `source`.
69+
- <xref:System.Buffers.OperationStatus.NeedMoreData?displayProperty=nameWithType>: The decompression action is partially done at least one more byte is required to complete the decompression task. This method should be called again with more input to decompress.
70+
- <xref:System.Buffers.OperationStatus.InvalidData?displayProperty=nameWithType>: The data in `source` is invalid and could not be decompressed.
71+
72+
]]></format>
73+
</remarks>
6274
</Docs>
6375
</Member>
6476
<Member MemberName="Dispose">
@@ -85,7 +97,7 @@
8597
</ReturnValue>
8698
<Parameters />
8799
<Docs>
88-
<summary>To be added.</summary>
100+
<summary>Releases all resources used by the current Brotli decoder instance.</summary>
89101
<remarks>To be added.</remarks>
90102
</Docs>
91103
</Member>
@@ -114,12 +126,20 @@
114126
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" />
115127
</Parameters>
116128
<Docs>
117-
<param name="source">To be added.</param>
118-
<param name="destination">To be added.</param>
119-
<param name="bytesWritten">To be added.</param>
120-
<summary>To be added.</summary>
121-
<returns>To be added.</returns>
122-
<remarks>To be added.</remarks>
129+
<param name="source">A buffer containing the compressed data.</param>
130+
<param name="destination">When this method returns, a byte span containing the decompressed data.</param>
131+
<param name="bytesWritten">The total number of bytes that were written in the <paramref name="destination" />.</param>
132+
<summary>Attempts to decompress data that was compressed with the Brotli algorithm.</summary>
133+
<returns><see langword="true" /> on success; <see langword="false" /> otherwise.</returns>
134+
<remarks>
135+
<format type="text/markdown"><![CDATA[
136+
137+
## Remarks
138+
139+
If this method returns `false`, `destination` may be empty or contain partially decompressed data, with `bytesWritten` being zero or greater than zero but less than the expected total.
140+
141+
]]></format>
142+
</remarks>
123143
</Docs>
124144
</Member>
125145
</Members>

0 commit comments

Comments
 (0)