1 <?xml version="1.0" encoding="utf-8"?>
4 <name>System.IO.Compression</name>
7 <member name="T:System.IO.Compression.CompressionLevel">
8 <summary>Specifies values that indicate whether a compression operation emphasizes speed or compression size.</summary>
10 <member name="F:System.IO.Compression.CompressionLevel.Fastest">
11 <summary>The compression operation should complete as quickly as possible, even if the resulting file is not optimally compressed.</summary>
13 <member name="F:System.IO.Compression.CompressionLevel.NoCompression">
14 <summary>No compression should be performed on the file.</summary>
16 <member name="F:System.IO.Compression.CompressionLevel.Optimal">
17 <summary>The compression operation should be optimally compressed, even if the operation takes a longer time to complete.</summary>
19 <member name="F:System.IO.Compression.CompressionLevel.SmallestSize">
20 <summary>The compression operation should create output as small as possible, even if the operation takes a longer time to complete.</summary>
22 <member name="T:System.IO.Compression.CompressionMode">
23 <summary>Specifies whether to compress or decompress the underlying stream.</summary>
25 <member name="F:System.IO.Compression.CompressionMode.Compress">
26 <summary>Compresses the underlying stream.</summary>
28 <member name="F:System.IO.Compression.CompressionMode.Decompress">
29 <summary>Decompresses the underlying stream.</summary>
31 <member name="T:System.IO.Compression.DeflateStream">
32 <summary>Provides methods and properties for compressing and decompressing streams by using the Deflate algorithm.</summary>
34 <member name="M:System.IO.Compression.DeflateStream.#ctor(System.IO.Stream,System.IO.Compression.CompressionLevel)">
35 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.DeflateStream" /> class by using the specified stream and compression level.</summary>
36 <param name="stream">The stream to compress.</param>
37 <param name="compressionLevel">One of the enumeration values that indicates whether to emphasize speed or compression efficiency when compressing the stream.</param>
38 <exception cref="T:System.ArgumentNullException">
39 <paramref name="stream" /> is <see langword="null" />.</exception>
40 <exception cref="T:System.ArgumentException">The stream does not support write operations such as compression. (The <see cref="P:System.IO.Stream.CanWrite" /> property on the stream object is <see langword="false" />.)</exception>
42 <member name="M:System.IO.Compression.DeflateStream.#ctor(System.IO.Stream,System.IO.Compression.CompressionLevel,System.Boolean)">
43 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.DeflateStream" /> class by using the specified stream and compression level, and optionally leaves the stream open.</summary>
44 <param name="stream">The stream to compress.</param>
45 <param name="compressionLevel">One of the enumeration values that indicates whether to emphasize speed or compression efficiency when compressing the stream.</param>
46 <param name="leaveOpen">
47 <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>
48 <exception cref="T:System.ArgumentNullException">
49 <paramref name="stream" /> is <see langword="null" />.</exception>
50 <exception cref="T:System.ArgumentException">The stream does not support write operations such as compression. (The <see cref="P:System.IO.Stream.CanWrite" /> property on the stream object is <see langword="false" />.)</exception>
52 <member name="M:System.IO.Compression.DeflateStream.#ctor(System.IO.Stream,System.IO.Compression.CompressionMode)">
53 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.DeflateStream" /> class by using the specified stream and compression mode.</summary>
54 <param name="stream">The stream to compress or decompress.</param>
55 <param name="mode">One of the enumeration values that indicates whether to compress or decompress the stream.</param>
56 <exception cref="T:System.ArgumentNullException">
57 <paramref name="stream" /> is <see langword="null" />.</exception>
58 <exception cref="T:System.ArgumentException">
59 <paramref name="mode" /> is not a valid <see cref="T:System.IO.Compression.CompressionMode" /> value.
63 <see cref="T:System.IO.Compression.CompressionMode" /> is <see cref="F:System.IO.Compression.CompressionMode.Compress" /> and <see cref="P:System.IO.Stream.CanWrite" /> is <see langword="false" />.
67 <see cref="T:System.IO.Compression.CompressionMode" /> is <see cref="F:System.IO.Compression.CompressionMode.Decompress" /> and <see cref="P:System.IO.Stream.CanRead" /> is <see langword="false" />.</exception>
69 <member name="M:System.IO.Compression.DeflateStream.#ctor(System.IO.Stream,System.IO.Compression.CompressionMode,System.Boolean)">
70 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.DeflateStream" /> class by using the specified stream and compression mode, and optionally leaves the stream open.</summary>
71 <param name="stream">The stream to compress or decompress.</param>
72 <param name="mode">One of the enumeration values that indicates whether to compress or decompress the stream.</param>
73 <param name="leaveOpen">
74 <see langword="true" /> to leave the stream open after disposing the <see cref="T:System.IO.Compression.DeflateStream" /> object; otherwise, <see langword="false" />.</param>
75 <exception cref="T:System.ArgumentNullException">
76 <paramref name="stream" /> is <see langword="null" />.</exception>
77 <exception cref="T:System.ArgumentException">
78 <paramref name="mode" /> is not a valid <see cref="T:System.IO.Compression.CompressionMode" /> value.
82 <see cref="T:System.IO.Compression.CompressionMode" /> is <see cref="F:System.IO.Compression.CompressionMode.Compress" /> and <see cref="P:System.IO.Stream.CanWrite" /> is <see langword="false" />.
86 <see cref="T:System.IO.Compression.CompressionMode" /> is <see cref="F:System.IO.Compression.CompressionMode.Decompress" /> and <see cref="P:System.IO.Stream.CanRead" /> is <see langword="false" />.</exception>
88 <member name="M:System.IO.Compression.DeflateStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)">
89 <summary>Begins an asynchronous read operation. (Consider using the <see cref="M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32)" /> method instead.)</summary>
90 <param name="buffer">The byte array to read the data into.</param>
91 <param name="offset">The byte offset in <paramref name="array" /> at which to begin reading data from the stream.</param>
92 <param name="count">The maximum number of bytes to read.</param>
93 <param name="asyncCallback">An optional asynchronous callback, to be called when the read operation is complete.</param>
94 <param name="asyncState">A user-provided object that distinguishes this particular asynchronous read request from other requests.</param>
95 <exception cref="T:System.IO.IOException">The method tried to read asynchronously past the end of the stream, or a disk error occurred.</exception>
96 <exception cref="T:System.ArgumentException">One or more of the arguments is invalid.</exception>
97 <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
98 <exception cref="T:System.NotSupportedException">The current <see cref="T:System.IO.Compression.DeflateStream" /> implementation does not support the read operation.</exception>
99 <exception cref="T:System.InvalidOperationException">This call cannot be completed.</exception>
100 <returns>An object that represents the asynchronous read operation, which could still be pending.</returns>
102 <member name="M:System.IO.Compression.DeflateStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)">
103 <summary>Begins an asynchronous write operation. (Consider using the <see cref="M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32)" /> method instead.)</summary>
104 <param name="buffer">The buffer to write data from.</param>
105 <param name="offset">The byte offset in <paramref name="buffer" /> to begin writing from.</param>
106 <param name="count">The maximum number of bytes to write.</param>
107 <param name="asyncCallback">An optional asynchronous callback, to be called when the write operation is complete.</param>
108 <param name="asyncState">A user-provided object that distinguishes this particular asynchronous write request from other requests.</param>
109 <exception cref="T:System.IO.IOException">The method tried to write asynchronously past the end of the stream, or a disk error occurred.</exception>
110 <exception cref="T:System.ArgumentException">One or more of the arguments is invalid.</exception>
111 <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
112 <exception cref="T:System.NotSupportedException">The current <see cref="T:System.IO.Compression.DeflateStream" /> implementation does not support the write operation.</exception>
113 <exception cref="T:System.InvalidOperationException">The write operation cannot be performed because the stream is closed.</exception>
114 <returns>An object that represents the asynchronous write operation, which could still be pending.</returns>
116 <member name="M:System.IO.Compression.DeflateStream.CopyTo(System.IO.Stream,System.Int32)">
117 <summary>Reads the bytes from the current Deflate stream and writes them to another stream, using a specified buffer size.</summary>
118 <param name="destination">The stream to which the contents of the current Deflate stream will be copied.</param>
119 <param name="bufferSize">The size of the buffer. This value must be greater than zero. The default size is 81920.</param>
121 <member name="M:System.IO.Compression.DeflateStream.CopyToAsync(System.IO.Stream,System.Int32,System.Threading.CancellationToken)">
122 <summary>Asynchronously reads the bytes from the current Deflate stream and writes them to another stream, using a specified buffer size.</summary>
123 <param name="destination">The stream to which the contents of the current Deflate stream will be copied.</param>
124 <param name="bufferSize">The size, in bytes, of the buffer. This value must be greater than zero. The default size is 81920.</param>
125 <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
126 <returns>A task that represents the asynchronous copy operation.</returns>
128 <member name="M:System.IO.Compression.DeflateStream.Dispose(System.Boolean)">
129 <summary>Releases the unmanaged resources used by the <see cref="T:System.IO.Compression.DeflateStream" /> and optionally releases the managed resources.</summary>
130 <param name="disposing">
131 <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
133 <member name="M:System.IO.Compression.DeflateStream.DisposeAsync">
134 <summary>Asynchronously releases the unmanaged resources used by the <see cref="T:System.IO.Compression.DeflateStream" />.</summary>
135 <returns>A task that represents the asynchronous dispose operation.</returns>
137 <member name="M:System.IO.Compression.DeflateStream.EndRead(System.IAsyncResult)">
138 <summary>Waits for the pending asynchronous read to complete. (Consider using the <see cref="M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32)" /> method instead.)</summary>
139 <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
140 <exception cref="T:System.ArgumentNullException">
141 <paramref name="asyncResult" /> is <see langword="null" />.</exception>
142 <exception cref="T:System.ArgumentException">
143 <paramref name="asyncResult" /> did not originate from a <see cref="M:System.IO.Compression.DeflateStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" /> method on the current stream.</exception>
144 <exception cref="T:System.SystemException">An exception was thrown during a call to <see cref="M:System.Threading.WaitHandle.WaitOne" />.</exception>
145 <exception cref="T:System.InvalidOperationException">The end call is invalid because asynchronous read operations for this stream are not yet complete.
149 The stream is <see langword="null" />.</exception>
150 <returns>The number of bytes read from the stream, between 0 (zero) and the number of bytes you requested. <see cref="T:System.IO.Compression.DeflateStream" /> returns 0 only at the end of the stream; otherwise, it blocks until at least one byte is available.</returns>
152 <member name="M:System.IO.Compression.DeflateStream.EndWrite(System.IAsyncResult)">
153 <summary>Ends an asynchronous write operation. (Consider using the <see cref="M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32)" /> method instead.)</summary>
154 <param name="asyncResult">A reference to the outstanding asynchronous I/O request.</param>
155 <exception cref="T:System.ArgumentNullException">
156 <paramref name="asyncResult" /> is <see langword="null" />.</exception>
157 <exception cref="T:System.ArgumentException">
158 <paramref name="asyncResult" /> did not originate from a <see cref="M:System.IO.Compression.DeflateStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" /> method on the current stream.</exception>
159 <exception cref="T:System.Exception">An exception was thrown during a call to <see cref="M:System.Threading.WaitHandle.WaitOne" />.</exception>
160 <exception cref="T:System.InvalidOperationException">The stream is <see langword="null" />.
164 The end write call is invalid.</exception>
166 <member name="M:System.IO.Compression.DeflateStream.Flush">
167 <summary>The current implementation of this method has no functionality.</summary>
168 <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
170 <member name="M:System.IO.Compression.DeflateStream.FlushAsync(System.Threading.CancellationToken)">
171 <summary>Asynchronously clears all buffers for this Deflate stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.</summary>
172 <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
173 <returns>A task that represents the asynchronous flush operation.</returns>
175 <member name="M:System.IO.Compression.DeflateStream.Read(System.Byte[],System.Int32,System.Int32)">
176 <summary>Reads a number of decompressed bytes into the specified byte array.</summary>
177 <param name="buffer" />
178 <param name="offset">The byte offset in <paramref name="array" /> at which the read bytes will be placed.</param>
179 <param name="count">The maximum number of decompressed bytes to read.</param>
180 <exception cref="T:System.ArgumentNullException">
181 <paramref name="array" /> is <see langword="null" />.</exception>
182 <exception cref="T:System.InvalidOperationException">The <see cref="T:System.IO.Compression.CompressionMode" /> value was <see langword="Compress" /> when the object was created.
186 The underlying stream does not support reading.</exception>
187 <exception cref="T:System.ArgumentOutOfRangeException">
188 <paramref name="offset" /> or <paramref name="count" /> is less than zero.
192 <paramref name="array" /> length minus the index starting point is less than <paramref name="count" />.</exception>
193 <exception cref="T:System.IO.InvalidDataException">The data is in an invalid format.</exception>
194 <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
195 <returns>The number of bytes that were read into the byte array.</returns>
197 <member name="M:System.IO.Compression.DeflateStream.Read(System.Span{System.Byte})">
198 <summary>Reads a sequence of bytes from the current Deflate stream into a byte span and advances the position within the Deflate stream by the number of bytes read.</summary>
199 <param name="buffer">A region of memory. When this method returns, the contents of this region are replaced by the bytes read from the current source.</param>
200 <returns>The total number of bytes read into the buffer. This can be less than the number of bytes allocated in the buffer if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.</returns>
202 <member name="M:System.IO.Compression.DeflateStream.ReadAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
203 <summary>Asynchronously reads a sequence of bytes from the current Deflate stream, writes them to a byte array, advances the position within the Deflate stream by the number of bytes read, and monitors cancellation requests.</summary>
204 <param name="offset">The byte offset in <paramref name="array" /> at which to begin writing data from the Deflate stream.</param>
205 <param name="count">The maximum number of bytes to read.</param>
206 <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
207 <param name="buffer" />
208 <returns>A task that represents the asynchronous read operation, which wraps the total number of bytes read into the <paramref name="array" />. The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the Deflate stream has been reached.</returns>
210 <member name="M:System.IO.Compression.DeflateStream.ReadAsync(System.Memory{System.Byte},System.Threading.CancellationToken)">
211 <summary>Asynchronously reads a sequence of bytes from the current Deflate stream, writes them to a byte memory range, advances the position within the Deflate stream by the number of bytes read, and monitors cancellation requests.</summary>
212 <param name="buffer">The region of memory to write the data into.</param>
213 <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
214 <returns>A task that represents the asynchronous read operation, which wraps the total number of bytes read into the buffer. The result value can be less than the number of bytes allocated in the buffer if that many bytes are not currently available, or it can be 0 (zero) if the end of the Deflate stream has been reached.</returns>
216 <member name="M:System.IO.Compression.DeflateStream.ReadByte">
217 <summary>Reads a byte from the Deflate stream and advances the position within the stream by one byte, or returns -1 if at the end of the Deflate stream.</summary>
218 <returns>The unsigned byte cast to an <see cref="T:System.Int32" />, or -1 if at the end of the stream.</returns>
220 <member name="M:System.IO.Compression.DeflateStream.Seek(System.Int64,System.IO.SeekOrigin)">
221 <summary>This operation is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
222 <param name="offset">The location in the stream.</param>
223 <param name="origin">One of the <see cref="T:System.IO.SeekOrigin" /> values.</param>
224 <exception cref="T:System.NotSupportedException">This property is not supported on this stream.</exception>
225 <returns>A long value.</returns>
227 <member name="M:System.IO.Compression.DeflateStream.SetLength(System.Int64)">
228 <summary>This operation is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
229 <param name="value">The length of the stream.</param>
230 <exception cref="T:System.NotSupportedException">This property is not supported on this stream.</exception>
232 <member name="M:System.IO.Compression.DeflateStream.Write(System.Byte[],System.Int32,System.Int32)">
233 <summary>Writes compressed bytes to the underlying stream from the specified byte array.</summary>
234 <param name="buffer" />
235 <param name="offset">The byte offset in <paramref name="array" /> from which the bytes will be read.</param>
236 <param name="count">The maximum number of bytes to write.</param>
238 <member name="M:System.IO.Compression.DeflateStream.Write(System.ReadOnlySpan{System.Byte})">
239 <summary>Writes a sequence of bytes to the current Deflate stream and advances the current position within this Deflate stream by the number of bytes written.</summary>
240 <param name="buffer">A region of memory. This method copies the contents of this region to the current Deflate stream.</param>
242 <member name="M:System.IO.Compression.DeflateStream.WriteAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
243 <summary>Asynchronously writes compressed bytes to the underlying Deflate stream from the specified byte array.</summary>
244 <param name="offset">The zero-based byte offset in <paramref name="array" /> from which to begin copying bytes to the Deflate stream.</param>
245 <param name="count">The maximum number of bytes to write.</param>
246 <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
247 <param name="buffer" />
248 <returns>A task that represents the asynchronous write operation.</returns>
250 <member name="M:System.IO.Compression.DeflateStream.WriteAsync(System.ReadOnlyMemory{System.Byte},System.Threading.CancellationToken)">
251 <summary>Asynchronously writes compressed bytes to the underlying Deflate stream from the specified read-only memory region.</summary>
252 <param name="buffer">The region of memory to write data from.</param>
253 <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
254 <returns>A task that represents the asynchronous write operation.</returns>
256 <member name="P:System.IO.Compression.DeflateStream.BaseStream">
257 <summary>Gets a reference to the underlying stream.</summary>
258 <exception cref="T:System.ObjectDisposedException">The underlying stream is closed.</exception>
259 <returns>A stream object that represents the underlying stream.</returns>
261 <member name="P:System.IO.Compression.DeflateStream.CanRead">
262 <summary>Gets a value indicating whether the stream supports reading while decompressing a file.</summary>
264 <see langword="true" /> if the <see cref="T:System.IO.Compression.CompressionMode" /> value is <see langword="Decompress" />, and the underlying stream is opened and supports reading; otherwise, <see langword="false" />.</returns>
266 <member name="P:System.IO.Compression.DeflateStream.CanSeek">
267 <summary>Gets a value indicating whether the stream supports seeking.</summary>
269 <see langword="false" /> in all cases.</returns>
271 <member name="P:System.IO.Compression.DeflateStream.CanWrite">
272 <summary>Gets a value indicating whether the stream supports writing.</summary>
274 <see langword="true" /> if the <see cref="T:System.IO.Compression.CompressionMode" /> value is <see langword="Compress" />, and the underlying stream supports writing and is not closed; otherwise, <see langword="false" />.</returns>
276 <member name="P:System.IO.Compression.DeflateStream.Length">
277 <summary>This property is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
278 <exception cref="T:System.NotSupportedException">This property is not supported on this stream.</exception>
279 <returns>A long value.</returns>
281 <member name="P:System.IO.Compression.DeflateStream.Position">
282 <summary>This property is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
283 <exception cref="T:System.NotSupportedException">This property is not supported on this stream.</exception>
284 <returns>A long value.</returns>
286 <member name="T:System.IO.Compression.GZipStream">
287 <summary>Provides methods and properties used to compress and decompress streams by using the GZip data format specification.</summary>
289 <member name="M:System.IO.Compression.GZipStream.#ctor(System.IO.Stream,System.IO.Compression.CompressionLevel)">
290 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.GZipStream" /> class by using the specified stream and compression level.</summary>
291 <param name="stream">The stream to compress.</param>
292 <param name="compressionLevel">One of the enumeration values that indicates whether to emphasize speed or compression efficiency when compressing the stream.</param>
293 <exception cref="T:System.ArgumentNullException">
294 <paramref name="stream" /> is <see langword="null" />.</exception>
295 <exception cref="T:System.ArgumentException">The stream does not support write operations such as compression. (The <see cref="P:System.IO.Stream.CanWrite" /> property on the stream object is <see langword="false" />.)</exception>
297 <member name="M:System.IO.Compression.GZipStream.#ctor(System.IO.Stream,System.IO.Compression.CompressionLevel,System.Boolean)">
298 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.GZipStream" /> class by using the specified stream and compression level, and optionally leaves the stream open.</summary>
299 <param name="stream">The stream to write the compressed data to.</param>
300 <param name="compressionLevel">One of the enumeration values that indicates whether to emphasize speed or compression efficiency when compressing the stream.</param>
301 <param name="leaveOpen">
302 <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>
303 <exception cref="T:System.ArgumentNullException">
304 <paramref name="stream" /> is <see langword="null" />.</exception>
305 <exception cref="T:System.ArgumentException">The stream does not support write operations such as compression. (The <see cref="P:System.IO.Stream.CanWrite" /> property on the stream object is <see langword="false" />.)</exception>
307 <member name="M:System.IO.Compression.GZipStream.#ctor(System.IO.Stream,System.IO.Compression.CompressionMode)">
308 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.GZipStream" /> class by using the specified stream and compression mode.</summary>
309 <param name="stream">The stream the compressed or decompressed data is written to.</param>
310 <param name="mode">One of the enumeration values that indicates whether to compress or decompress the stream.</param>
311 <exception cref="T:System.ArgumentNullException">
312 <paramref name="stream" /> is <see langword="null" />.</exception>
313 <exception cref="T:System.ArgumentException">
314 <paramref name="mode" /> is not a valid <see cref="T:System.IO.Compression.CompressionMode" /> enumeration value.
318 <see cref="T:System.IO.Compression.CompressionMode" /> is <see cref="F:System.IO.Compression.CompressionMode.Compress" /> and <see cref="P:System.IO.Stream.CanWrite" /> is <see langword="false" />.
322 <see cref="T:System.IO.Compression.CompressionMode" /> is <see cref="F:System.IO.Compression.CompressionMode.Decompress" /> and <see cref="P:System.IO.Stream.CanRead" /> is <see langword="false" />.</exception>
324 <member name="M:System.IO.Compression.GZipStream.#ctor(System.IO.Stream,System.IO.Compression.CompressionMode,System.Boolean)">
325 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.GZipStream" /> class by using the specified stream and compression mode, and optionally leaves the stream open.</summary>
326 <param name="stream">The stream to compress.</param>
327 <param name="mode">One of the enumeration values that indicates whether to compress or decompress the stream.</param>
328 <param name="leaveOpen">
329 <see langword="true" /> to leave the stream open after disposing the <see cref="T:System.IO.Compression.GZipStream" /> object; otherwise, <see langword="false" />.</param>
330 <exception cref="T:System.ArgumentNullException">
331 <paramref name="stream" /> is <see langword="null" />.</exception>
332 <exception cref="T:System.ArgumentException">
333 <paramref name="mode" /> is not a valid <see cref="T:System.IO.Compression.CompressionMode" /> value.
337 <see cref="T:System.IO.Compression.CompressionMode" /> is <see cref="F:System.IO.Compression.CompressionMode.Compress" /> and <see cref="P:System.IO.Stream.CanWrite" /> is <see langword="false" />.
341 <see cref="T:System.IO.Compression.CompressionMode" /> is <see cref="F:System.IO.Compression.CompressionMode.Decompress" /> and <see cref="P:System.IO.Stream.CanRead" /> is <see langword="false" />.</exception>
343 <member name="M:System.IO.Compression.GZipStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)">
344 <summary>Begins an asynchronous read operation. (Consider using the <see cref="M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32)" /> method instead.)</summary>
345 <param name="buffer">The byte array to read the data into.</param>
346 <param name="offset">The byte offset in <paramref name="array" /> at which to begin reading data from the stream.</param>
347 <param name="count">The maximum number of bytes to read.</param>
348 <param name="asyncCallback">An optional asynchronous callback, to be called when the read operation is complete.</param>
349 <param name="asyncState">A user-provided object that distinguishes this particular asynchronous read request from other requests.</param>
350 <exception cref="T:System.IO.IOException">The method tried to read asynchronously past the end of the stream, or a disk error occurred.</exception>
351 <exception cref="T:System.ArgumentException">One or more of the arguments is invalid.</exception>
352 <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
353 <exception cref="T:System.NotSupportedException">The current <see cref="T:System.IO.Compression.GZipStream" /> implementation does not support the read operation.</exception>
354 <exception cref="T:System.InvalidOperationException">A read operation cannot be performed because the stream is closed.</exception>
355 <returns>An object that represents the asynchronous read operation, which could still be pending.</returns>
357 <member name="M:System.IO.Compression.GZipStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)">
358 <summary>Begins an asynchronous write operation. (Consider using the <see cref="M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32)" /> method instead.)</summary>
359 <param name="buffer">The buffer containing data to write to the current stream.</param>
360 <param name="offset">The byte offset in <paramref name="array" /> at which to begin writing.</param>
361 <param name="count">The maximum number of bytes to write.</param>
362 <param name="asyncCallback">An optional asynchronous callback to be called when the write operation is complete.</param>
363 <param name="asyncState">A user-provided object that distinguishes this particular asynchronous write request from other requests.</param>
364 <exception cref="T:System.InvalidOperationException">The underlying stream is <see langword="null" />.
368 The underlying stream is closed.</exception>
369 <returns>An object that represents the asynchronous write operation, which could still be pending.</returns>
371 <member name="M:System.IO.Compression.GZipStream.CopyTo(System.IO.Stream,System.Int32)">
372 <summary>Reads the bytes from the current GZip stream and writes them to another stream, using a specified buffer size.</summary>
373 <param name="destination">The stream to which the contents of the current GZip stream will be copied.</param>
374 <param name="bufferSize">The size of the buffer. This value must be greater than zero. The default size is 81920.</param>
376 <member name="M:System.IO.Compression.GZipStream.CopyToAsync(System.IO.Stream,System.Int32,System.Threading.CancellationToken)">
377 <summary>Asynchronously reads the bytes from the current GZip stream and writes them to another stream, using a specified buffer size.</summary>
378 <param name="destination">The stream to which the contents of the current GZip stream will be copied.</param>
379 <param name="bufferSize">The size, in bytes, of the buffer. This value must be greater than zero. The default size is 81920.</param>
380 <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
381 <returns>A task that represents the asynchronous copy operation.</returns>
383 <member name="M:System.IO.Compression.GZipStream.Dispose(System.Boolean)">
384 <summary>Releases the unmanaged resources used by the <see cref="T:System.IO.Compression.GZipStream" /> and optionally releases the managed resources.</summary>
385 <param name="disposing">
386 <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
388 <member name="M:System.IO.Compression.GZipStream.DisposeAsync">
389 <summary>Asynchronously releases the unmanaged resources used by the <see cref="T:System.IO.Compression.GZipStream" />.</summary>
390 <returns>A task that represents the asynchronous dispose operation.</returns>
392 <member name="M:System.IO.Compression.GZipStream.EndRead(System.IAsyncResult)">
393 <summary>Waits for the pending asynchronous read to complete. (Consider using the <see cref="M:System.IO.Stream.ReadAsync(System.Byte[],System.Int32,System.Int32)" /> method instead.)</summary>
394 <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
395 <exception cref="T:System.ArgumentNullException">
396 <paramref name="asyncResult" /> is <see langword="null" />.</exception>
397 <exception cref="T:System.ArgumentException">
398 <paramref name="asyncResult" /> did not originate from a <see cref="M:System.IO.Compression.GZipStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" /> method on the current stream.</exception>
399 <exception cref="T:System.InvalidOperationException">The end operation cannot be performed because the stream is closed.</exception>
400 <returns>The number of bytes read from the stream, between 0 (zero) and the number of bytes you requested. <see cref="T:System.IO.Compression.GZipStream" /> returns 0 only at the end of the stream; otherwise, it blocks until at least one byte is available.</returns>
402 <member name="M:System.IO.Compression.GZipStream.EndWrite(System.IAsyncResult)">
403 <summary>Handles the end of an asynchronous write operation. (Consider using the <see cref="M:System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32)" /> method instead.)</summary>
404 <param name="asyncResult">The object that represents the asynchronous call.</param>
405 <exception cref="T:System.InvalidOperationException">The underlying stream is <see langword="null" />.
409 The underlying stream is closed.</exception>
411 <member name="M:System.IO.Compression.GZipStream.Flush">
412 <summary>Flushes the internal buffers.</summary>
413 <exception cref="T:System.ObjectDisposedException">The underlying stream is closed.</exception>
415 <member name="M:System.IO.Compression.GZipStream.FlushAsync(System.Threading.CancellationToken)">
416 <summary>Asynchronously clears all buffers for this GZip stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.</summary>
417 <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
418 <returns>A task that represents the asynchronous flush operation.</returns>
420 <member name="M:System.IO.Compression.GZipStream.Read(System.Byte[],System.Int32,System.Int32)">
421 <summary>Reads a number of decompressed bytes into the specified byte array.</summary>
422 <param name="buffer" />
423 <param name="offset">The byte offset in <paramref name="array" /> at which the read bytes will be placed.</param>
424 <param name="count">The maximum number of decompressed bytes to read.</param>
425 <exception cref="T:System.ArgumentNullException">
426 <paramref name="array" /> is <see langword="null" />.</exception>
427 <exception cref="T:System.InvalidOperationException">The <see cref="T:System.IO.Compression.CompressionMode" /> value was <see langword="Compress" /> when the object was created.
431 The underlying stream does not support reading.</exception>
432 <exception cref="T:System.ArgumentOutOfRangeException">
433 <paramref name="offset" /> or <paramref name="count" /> is less than zero.
437 <paramref name="array" /> length minus the index starting point is less than <paramref name="count" />.</exception>
438 <exception cref="T:System.IO.InvalidDataException">The data is in an invalid format.</exception>
439 <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
440 <returns>The number of bytes that were decompressed into the byte array. If the end of the stream has been reached, zero or the number of bytes read is returned.</returns>
442 <member name="M:System.IO.Compression.GZipStream.Read(System.Span{System.Byte})">
443 <summary>Reads a sequence of bytes from the current GZip stream into a byte span and advances the position within the GZip stream by the number of bytes read.</summary>
444 <param name="buffer">A region of memory. When this method returns, the contents of this region are replaced by the bytes read from the current source.</param>
445 <returns>The total number of bytes read into the buffer. This can be less than the number of bytes allocated in the buffer if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.</returns>
447 <member name="M:System.IO.Compression.GZipStream.ReadAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
448 <summary>Asynchronously reads a sequence of bytes from the current GZip stream into a byte array, advances the position within the GZip stream by the number of bytes read, and monitors cancellation requests.</summary>
449 <param name="offset">The byte offset in <paramref name="array" /> at which to begin writing data from the GZip stream.</param>
450 <param name="count">The maximum number of bytes to read.</param>
451 <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
452 <param name="buffer" />
453 <returns>A task that represents the asynchronous read operation, which wraps the total number of bytes read into the <paramref name="array" />. The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the GZip stream has been reached.</returns>
455 <member name="M:System.IO.Compression.GZipStream.ReadAsync(System.Memory{System.Byte},System.Threading.CancellationToken)">
456 <summary>Asynchronously reads a sequence of bytes from the current GZip stream into a byte memory region, advances the position within the GZip stream by the number of bytes read, and monitors cancellation requests.</summary>
457 <param name="buffer">The region of memory to write the data into.</param>
458 <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
459 <returns>A task that represents the asynchronous read operation, which wraps the total number of bytes read into the buffer. The result value can be less than the number of bytes allocated in the buffer if that many bytes are not currently available, or it can be 0 (zero) if the end of the GZip stream has been reached.</returns>
461 <member name="M:System.IO.Compression.GZipStream.ReadByte">
462 <summary>Reads a byte from the GZip stream and advances the position within the stream by one byte, or returns -1 if at the end of the GZip stream.</summary>
463 <returns>The unsigned byte cast to an <see cref="T:System.Int32" />, or -1 if at the end of the stream.</returns>
465 <member name="M:System.IO.Compression.GZipStream.Seek(System.Int64,System.IO.SeekOrigin)">
466 <summary>This property is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
467 <param name="offset">The location in the stream.</param>
468 <param name="origin">One of the <see cref="T:System.IO.SeekOrigin" /> values.</param>
469 <exception cref="T:System.NotSupportedException">This property is not supported on this stream.</exception>
470 <returns>A long value.</returns>
472 <member name="M:System.IO.Compression.GZipStream.SetLength(System.Int64)">
473 <summary>This property is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
474 <param name="value">The length of the stream.</param>
475 <exception cref="T:System.NotSupportedException">This property is not supported on this stream.</exception>
477 <member name="M:System.IO.Compression.GZipStream.Write(System.Byte[],System.Int32,System.Int32)">
478 <summary>Writes compressed bytes to the underlying GZip stream from the specified byte array.</summary>
479 <param name="buffer" />
480 <param name="offset">The byte offset in <paramref name="array" /> from which the bytes will be read.</param>
481 <param name="count">The maximum number of bytes to write.</param>
482 <exception cref="T:System.ObjectDisposedException">The write operation cannot be performed because the stream is closed.</exception>
484 <member name="M:System.IO.Compression.GZipStream.Write(System.ReadOnlySpan{System.Byte})">
485 <summary>Writes a sequence of bytes to the current GZip stream from a read-only byte span and advances the current position within this GZip stream by the number of bytes written.</summary>
486 <param name="buffer">A region of memory. This method copies the contents of this region to the current GZip stream.</param>
488 <member name="M:System.IO.Compression.GZipStream.WriteAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
489 <summary>Asynchronously writes compressed bytes to the underlying GZip stream from the specified byte array.</summary>
490 <param name="offset">The zero-based byte offset in <paramref name="array" /> from which to begin copying bytes to the GZip stream.</param>
491 <param name="count">The maximum number of bytes to write.</param>
492 <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
493 <param name="buffer" />
494 <returns>A task that represents the asynchronous write operation.</returns>
496 <member name="M:System.IO.Compression.GZipStream.WriteAsync(System.ReadOnlyMemory{System.Byte},System.Threading.CancellationToken)">
497 <summary>Asynchronously writes compressed bytes to the underlying GZip stream from the specified read-only byte memory region.</summary>
498 <param name="buffer">The region of memory to write data from.</param>
499 <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
500 <returns>A task that represents the asynchronous write operation.</returns>
502 <member name="P:System.IO.Compression.GZipStream.BaseStream">
503 <summary>Gets a reference to the underlying stream.</summary>
504 <exception cref="T:System.ObjectDisposedException">The underlying stream is closed.</exception>
505 <returns>A stream object that represents the underlying stream.</returns>
507 <member name="P:System.IO.Compression.GZipStream.CanRead">
508 <summary>Gets a value indicating whether the stream supports reading while decompressing a file.</summary>
510 <see langword="true" /> if the <see cref="T:System.IO.Compression.CompressionMode" /> value is <see langword="Decompress," /> and the underlying stream supports reading and is not closed; otherwise, <see langword="false" />.</returns>
512 <member name="P:System.IO.Compression.GZipStream.CanSeek">
513 <summary>Gets a value indicating whether the stream supports seeking.</summary>
515 <see langword="false" /> in all cases.</returns>
517 <member name="P:System.IO.Compression.GZipStream.CanWrite">
518 <summary>Gets a value indicating whether the stream supports writing.</summary>
520 <see langword="true" /> if the <see cref="T:System.IO.Compression.CompressionMode" /> value is <see langword="Compress" />, and the underlying stream supports writing and is not closed; otherwise, <see langword="false" />.</returns>
522 <member name="P:System.IO.Compression.GZipStream.Length">
523 <summary>This property is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
524 <exception cref="T:System.NotSupportedException">This property is not supported on this stream.</exception>
525 <returns>A long value.</returns>
527 <member name="P:System.IO.Compression.GZipStream.Position">
528 <summary>This property is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
529 <exception cref="T:System.NotSupportedException">This property is not supported on this stream.</exception>
530 <returns>A long value.</returns>
532 <member name="T:System.IO.Compression.ZipArchive">
533 <summary>Represents a package of compressed files in the zip archive format.</summary>
535 <member name="M:System.IO.Compression.ZipArchive.#ctor(System.IO.Stream)">
536 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.ZipArchive" /> class from the specified stream.</summary>
537 <param name="stream">The stream that contains the archive to be read.</param>
538 <exception cref="T:System.ArgumentException">The stream is already closed or does not support reading.</exception>
539 <exception cref="T:System.ArgumentNullException">
540 <paramref name="stream" /> is <see langword="null" />.</exception>
541 <exception cref="T:System.IO.InvalidDataException">The contents of the stream are not in the zip archive format.</exception>
543 <member name="M:System.IO.Compression.ZipArchive.#ctor(System.IO.Stream,System.IO.Compression.ZipArchiveMode)">
544 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.ZipArchive" /> class from the specified stream and with the specified mode.</summary>
545 <param name="stream">The input or output stream.</param>
546 <param name="mode">One of the enumeration values that indicates whether the zip archive is used to read, create, or update entries.</param>
547 <exception cref="T:System.ArgumentException">The stream is already closed, or the capabilities of the stream do not match the mode.</exception>
548 <exception cref="T:System.ArgumentNullException">
549 <paramref name="stream" /> is <see langword="null" />.</exception>
550 <exception cref="T:System.ArgumentOutOfRangeException">
551 <paramref name="mode" /> is an invalid value.</exception>
552 <exception cref="T:System.IO.InvalidDataException">The contents of the stream could not be interpreted as a zip archive.
556 <paramref name="mode" /> is <see cref="F:System.IO.Compression.ZipArchiveMode.Update" /> and an entry is missing from the archive or is corrupt and cannot be read.
560 <paramref name="mode" /> is <see cref="F:System.IO.Compression.ZipArchiveMode.Update" /> and an entry is too large to fit into memory.</exception>
562 <member name="M:System.IO.Compression.ZipArchive.#ctor(System.IO.Stream,System.IO.Compression.ZipArchiveMode,System.Boolean)">
563 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.ZipArchive" /> class on the specified stream for the specified mode, and optionally leaves the stream open.</summary>
564 <param name="stream">The input or output stream.</param>
565 <param name="mode">One of the enumeration values that indicates whether the zip archive is used to read, create, or update entries.</param>
566 <param name="leaveOpen">
567 <see langword="true" /> to leave the stream open after the <see cref="T:System.IO.Compression.ZipArchive" /> object is disposed; otherwise, <see langword="false" />.</param>
568 <exception cref="T:System.ArgumentException">The stream is already closed, or the capabilities of the stream do not match the mode.</exception>
569 <exception cref="T:System.ArgumentNullException">
570 <paramref name="stream" /> is <see langword="null" />.</exception>
571 <exception cref="T:System.ArgumentOutOfRangeException">
572 <paramref name="mode" /> is an invalid value.</exception>
573 <exception cref="T:System.IO.InvalidDataException">The contents of the stream could not be interpreted as a zip archive.
577 <paramref name="mode" /> is <see cref="F:System.IO.Compression.ZipArchiveMode.Update" /> and an entry is missing from the archive or is corrupt and cannot be read.
581 <paramref name="mode" /> is <see cref="F:System.IO.Compression.ZipArchiveMode.Update" /> and an entry is too large to fit into memory.</exception>
583 <member name="M:System.IO.Compression.ZipArchive.#ctor(System.IO.Stream,System.IO.Compression.ZipArchiveMode,System.Boolean,System.Text.Encoding)">
584 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.ZipArchive" /> class on the specified stream for the specified mode, uses the specified encoding for entry names, and optionally leaves the stream open.</summary>
585 <param name="stream">The input or output stream.</param>
586 <param name="mode">One of the enumeration values that indicates whether the zip archive is used to read, create, or update entries.</param>
587 <param name="leaveOpen">
588 <see langword="true" /> to leave the stream open after the <see cref="T:System.IO.Compression.ZipArchive" /> object is disposed; otherwise, <see langword="false" />.</param>
589 <param name="entryNameEncoding">The encoding to use when reading or writing entry names in this archive. Specify a value for this parameter only when an encoding is required for interoperability with zip archive tools and libraries that do not support UTF-8 encoding for entry names.</param>
590 <exception cref="T:System.ArgumentException">The stream is already closed, or the capabilities of the stream do not match the mode.
594 An encoding other than UTF-8 is specified for the <paramref name="entryNameEncoding" />.</exception>
595 <exception cref="T:System.ArgumentNullException">
596 <paramref name="stream" /> is <see langword="null" />.</exception>
597 <exception cref="T:System.ArgumentOutOfRangeException">
598 <paramref name="mode" /> is an invalid value.</exception>
599 <exception cref="T:System.IO.InvalidDataException">The contents of the stream could not be interpreted as a zip archive.
603 <paramref name="mode" /> is <see cref="F:System.IO.Compression.ZipArchiveMode.Update" /> and an entry is missing from the archive or is corrupt and cannot be read.
607 <paramref name="mode" /> is <see cref="F:System.IO.Compression.ZipArchiveMode.Update" /> and an entry is too large to fit into memory.</exception>
609 <member name="M:System.IO.Compression.ZipArchive.CreateEntry(System.String)">
610 <summary>Creates an empty entry that has the specified path and entry name in the zip archive.</summary>
611 <param name="entryName">A path, relative to the root of the archive, that specifies the name of the entry to be created.</param>
612 <exception cref="T:System.ArgumentException">
613 <paramref name="entryName" /> is <see cref="F:System.String.Empty" />.</exception>
614 <exception cref="T:System.ArgumentNullException">
615 <paramref name="entryName" /> is <see langword="null" />.</exception>
616 <exception cref="T:System.NotSupportedException">The zip archive does not support writing.</exception>
617 <exception cref="T:System.ObjectDisposedException">The zip archive has been disposed.</exception>
618 <returns>An empty entry in the zip archive.</returns>
620 <member name="M:System.IO.Compression.ZipArchive.CreateEntry(System.String,System.IO.Compression.CompressionLevel)">
621 <summary>Creates an empty entry that has the specified entry name and compression level in the zip archive.</summary>
622 <param name="entryName">A path, relative to the root of the archive, that specifies the name of the entry to be created.</param>
623 <param name="compressionLevel">One of the enumeration values that indicates whether to emphasize speed or compression effectiveness when creating the entry.</param>
624 <exception cref="T:System.ArgumentException">
625 <paramref name="entryName" /> is <see cref="F:System.String.Empty" />.</exception>
626 <exception cref="T:System.ArgumentNullException">
627 <paramref name="entryName" /> is <see langword="null" />.</exception>
628 <exception cref="T:System.NotSupportedException">The zip archive does not support writing.</exception>
629 <exception cref="T:System.ObjectDisposedException">The zip archive has been disposed.</exception>
630 <returns>An empty entry in the zip archive.</returns>
632 <member name="M:System.IO.Compression.ZipArchive.Dispose">
633 <summary>Releases the resources used by the current instance of the <see cref="T:System.IO.Compression.ZipArchive" /> class.</summary>
635 <member name="M:System.IO.Compression.ZipArchive.Dispose(System.Boolean)">
636 <summary>Called by the <see cref="M:System.IO.Compression.ZipArchive.Dispose" /> and <see cref="M:System.Object.Finalize" /> methods to release the unmanaged resources used by the current instance of the <see cref="T:System.IO.Compression.ZipArchive" /> class, and optionally finishes writing the archive and releases the managed resources.</summary>
637 <param name="disposing">
638 <see langword="true" /> to finish writing the archive and release unmanaged and managed resources; <see langword="false" /> to release only unmanaged resources.</param>
640 <member name="M:System.IO.Compression.ZipArchive.GetEntry(System.String)">
641 <summary>Retrieves a wrapper for the specified entry in the zip archive.</summary>
642 <param name="entryName">A path, relative to the root of the archive, that identifies the entry to retrieve.</param>
643 <exception cref="T:System.ArgumentException">
644 <paramref name="entryName" /> is <see cref="F:System.String.Empty" />.</exception>
645 <exception cref="T:System.ArgumentNullException">
646 <paramref name="entryName" /> is <see langword="null" />.</exception>
647 <exception cref="T:System.NotSupportedException">The zip archive does not support reading.</exception>
648 <exception cref="T:System.ObjectDisposedException">The zip archive has been disposed.</exception>
649 <exception cref="T:System.IO.InvalidDataException">The zip archive is corrupt, and its entries cannot be retrieved.</exception>
650 <returns>A wrapper for the specified entry in the archive; <see langword="null" /> if the entry does not exist in the archive.</returns>
652 <member name="P:System.IO.Compression.ZipArchive.Entries">
653 <summary>Gets the collection of entries that are currently in the zip archive.</summary>
654 <exception cref="T:System.NotSupportedException">The zip archive does not support reading.</exception>
655 <exception cref="T:System.ObjectDisposedException">The zip archive has been disposed.</exception>
656 <exception cref="T:System.IO.InvalidDataException">The zip archive is corrupt, and its entries cannot be retrieved.</exception>
657 <returns>The collection of entries that are currently in the zip archive.</returns>
659 <member name="P:System.IO.Compression.ZipArchive.Mode">
660 <summary>Gets a value that describes the type of action the zip archive can perform on entries.</summary>
661 <returns>One of the enumeration values that describes the type of action (read, create, or update) the zip archive can perform on entries.</returns>
663 <member name="T:System.IO.Compression.ZipArchiveEntry">
664 <summary>Represents a compressed file within a zip archive.</summary>
666 <member name="M:System.IO.Compression.ZipArchiveEntry.Delete">
667 <summary>Deletes the entry from the zip archive.</summary>
668 <exception cref="T:System.IO.IOException">The entry is already open for reading or writing.</exception>
669 <exception cref="T:System.NotSupportedException">The zip archive for this entry was opened in a mode other than <see cref="F:System.IO.Compression.ZipArchiveMode.Update" />.</exception>
670 <exception cref="T:System.ObjectDisposedException">The zip archive for this entry has been disposed.</exception>
672 <member name="M:System.IO.Compression.ZipArchiveEntry.Open">
673 <summary>Opens the entry from the zip archive.</summary>
674 <exception cref="T:System.IO.IOException">The entry is already currently open for writing.
678 The entry has been deleted from the archive.
682 The archive for this entry was opened with the <see cref="F:System.IO.Compression.ZipArchiveMode.Create" /> mode, and this entry has already been written to.</exception>
683 <exception cref="T:System.IO.InvalidDataException">The entry is either missing from the archive or is corrupt and cannot be read.
687 The entry has been compressed by using a compression method that is not supported.</exception>
688 <exception cref="T:System.ObjectDisposedException">The zip archive for this entry has been disposed.</exception>
689 <returns>The stream that represents the contents of the entry.</returns>
691 <member name="M:System.IO.Compression.ZipArchiveEntry.ToString">
692 <summary>Retrieves the relative path of the entry in the zip archive.</summary>
693 <returns>The relative path of the entry, which is the value stored in the <see cref="P:System.IO.Compression.ZipArchiveEntry.FullName" /> property.</returns>
695 <member name="P:System.IO.Compression.ZipArchiveEntry.Archive">
696 <summary>Gets the zip archive that the entry belongs to.</summary>
697 <returns>The zip archive that the entry belongs to, or <see langword="null" /> if the entry has been deleted.</returns>
699 <member name="P:System.IO.Compression.ZipArchiveEntry.CompressedLength">
700 <summary>Gets the compressed size of the entry in the zip archive.</summary>
701 <exception cref="T:System.InvalidOperationException">The value of the property is not available because the entry has been modified.</exception>
702 <returns>The compressed size of the entry in the zip archive.</returns>
704 <member name="P:System.IO.Compression.ZipArchiveEntry.Crc32">
705 <summary>The 32-bit Cyclic Redundant Check.</summary>
706 <returns>An unsigned integer (4 bytes) representing the CRC-32 field.</returns>
708 <member name="P:System.IO.Compression.ZipArchiveEntry.ExternalAttributes">
709 <summary>OS and application specific file attributes.</summary>
710 <returns>The external attributes written by the application when this entry was written. It is both host OS and application dependent.</returns>
712 <member name="P:System.IO.Compression.ZipArchiveEntry.FullName">
713 <summary>Gets the relative path of the entry in the zip archive.</summary>
714 <returns>The relative path of the entry in the zip archive.</returns>
716 <member name="P:System.IO.Compression.ZipArchiveEntry.LastWriteTime">
717 <summary>Gets or sets the last time the entry in the zip archive was changed.</summary>
718 <exception cref="T:System.NotSupportedException">The attempt to set this property failed, because the zip archive for the entry is in <see cref="F:System.IO.Compression.ZipArchiveMode.Read" /> mode.</exception>
719 <exception cref="T:System.IO.IOException">The archive mode is set to <see cref="F:System.IO.Compression.ZipArchiveMode.Create" />.
723 The archive mode is set to <see cref="F:System.IO.Compression.ZipArchiveMode.Update" /> and the entry has been opened.</exception>
724 <exception cref="T:System.ArgumentOutOfRangeException">An attempt was made to set this property to a value that is either earlier than 1980 January 1 0:00:00 (midnight) or later than 2107 December 31 23:59:58 (one second before midnight).</exception>
725 <returns>The last time the entry in the zip archive was changed.</returns>
727 <member name="P:System.IO.Compression.ZipArchiveEntry.Length">
728 <summary>Gets the uncompressed size of the entry in the zip archive.</summary>
729 <exception cref="T:System.InvalidOperationException">The value of the property is not available because the entry has been modified.</exception>
730 <returns>The uncompressed size of the entry in the zip archive.</returns>
732 <member name="P:System.IO.Compression.ZipArchiveEntry.Name">
733 <summary>Gets the file name of the entry in the zip archive.</summary>
734 <returns>The file name of the entry in the zip archive.</returns>
736 <member name="T:System.IO.Compression.ZipArchiveMode">
737 <summary>Specifies values for interacting with zip archive entries.</summary>
739 <member name="F:System.IO.Compression.ZipArchiveMode.Create">
740 <summary>Only creating new archive entries is permitted.</summary>
742 <member name="F:System.IO.Compression.ZipArchiveMode.Read">
743 <summary>Only reading archive entries is permitted.</summary>
745 <member name="F:System.IO.Compression.ZipArchiveMode.Update">
746 <summary>Both read and write operations are permitted for archive entries.</summary>
748 <member name="T:System.IO.Compression.ZLibStream">
749 <summary>Provides methods and properties used to compress and decompress streams by using the zlib data format specification.</summary>
751 <member name="M:System.IO.Compression.ZLibStream.#ctor(System.IO.Stream,System.IO.Compression.CompressionLevel)">
752 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.ZLibStream" /> class by using the specified stream and compression level.</summary>
753 <param name="stream">The stream to which compressed data is written.</param>
754 <param name="compressionLevel">One of the enumeration values that indicates whether to emphasize speed or compression efficiency when compressing the stream.</param>
756 <member name="M:System.IO.Compression.ZLibStream.#ctor(System.IO.Stream,System.IO.Compression.CompressionLevel,System.Boolean)">
757 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.ZLibStream" /> class by using the specified stream, compression level, and whether to leave the <paramref name="stream" /> open.</summary>
758 <param name="stream">The stream to which compressed data is written.</param>
759 <param name="compressionLevel">One of the enumeration values that indicates whether to emphasize speed or compression efficiency when compressing the stream.</param>
760 <param name="leaveOpen">
761 <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>
763 <member name="M:System.IO.Compression.ZLibStream.#ctor(System.IO.Stream,System.IO.Compression.CompressionMode)">
764 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.ZLibStream" /> class by using the specified stream and compression mode.</summary>
765 <param name="stream">The stream to which compressed data is written or from which decompressed data is read.</param>
766 <param name="mode">One of the enumeration values that indicates whether to compress or decompress the stream.</param>
768 <member name="M:System.IO.Compression.ZLibStream.#ctor(System.IO.Stream,System.IO.Compression.CompressionMode,System.Boolean)">
769 <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.ZLibStream" /> class by using the specified stream, compression mode, and whether to leave the <paramref name="stream" /> open.</summary>
770 <param name="stream">The stream to which compressed data is written or from which decompressed data is read.</param>
771 <param name="mode">One of the enumeration values that indicates whether to compress or decompress the stream.</param>
772 <param name="leaveOpen">
773 <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>
775 <member name="M:System.IO.Compression.ZLibStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)">
776 <summary>Begins an asynchronous read operation.</summary>
777 <param name="buffer">The byte array to read the data into.</param>
778 <param name="offset">The byte offset in <paramref name="buffer" /> at which to begin reading data from the stream.</param>
779 <param name="count">The maximum number of bytes to read.</param>
780 <param name="asyncCallback">An optional asynchronous callback, to be called when the read operation is complete.</param>
781 <param name="asyncState">A user-provided object that distinguishes this particular asynchronous read request from other requests.</param>
782 <exception cref="T:System.ArgumentNullException">
783 <paramref name="buffer" /> is <see langword="null" />.</exception>
784 <exception cref="T:System.ArgumentOutOfRangeException">
785 <paramref name="offset" /> is less than zero.
789 <paramref name="offset" /> and <paramref name="count" /> were out of bounds for the array.
793 <paramref name="count" /> is greater than the number of elements from <paramref name="offset" /> to the end of <paramref name="buffer" />.</exception>
794 <returns>An object that represents the asynchronous read operation, which could still be pending.</returns>
796 <member name="M:System.IO.Compression.ZLibStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)">
797 <summary>Begins an asynchronous write operation.</summary>
798 <param name="buffer">The buffer to write data from.</param>
799 <param name="offset">The byte offset in <paramref name="buffer" /> to begin writing from.</param>
800 <param name="count">The maximum number of bytes to write.</param>
801 <param name="asyncCallback">An optional asynchronous callback, to be called when the write operation is complete.</param>
802 <param name="asyncState">A user-provided object that distinguishes this particular asynchronous write request from other requests.</param>
803 <exception cref="T:System.ArgumentNullException">
804 <paramref name="buffer" /> is <see langword="null" />.</exception>
805 <exception cref="T:System.ArgumentOutOfRangeException">
806 <paramref name="offset" /> is less than zero.
810 <paramref name="offset" /> and <paramref name="count" /> were out of bounds for the array.
814 <paramref name="count" /> is greater than the number of elements from <paramref name="offset" /> to the end of <paramref name="buffer" />.</exception>
815 <returns>An object that represents the asynchronous write operation, which could still be pending.</returns>
817 <member name="M:System.IO.Compression.ZLibStream.CopyTo(System.IO.Stream,System.Int32)">
818 <summary>Reads the bytes from the current stream and writes them to another stream, using the specified buffer size.</summary>
819 <param name="destination">The stream to which the contents of the current stream will be copied.</param>
820 <param name="bufferSize">The size of the buffer. This value must be greater than zero.</param>
821 <exception cref="T:System.ArgumentNullException">
822 <paramref name="destination" /> is <see langword="null" />.</exception>
823 <exception cref="T:System.ArgumentOutOfRangeException">
824 <paramref name="bufferSize" /> is not a positive number.</exception>
825 <exception cref="T:System.NotSupportedException">The stream does not support writing.</exception>
826 <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
828 <member name="M:System.IO.Compression.ZLibStream.CopyToAsync(System.IO.Stream,System.Int32,System.Threading.CancellationToken)">
829 <summary>Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size and cancellation token.</summary>
830 <param name="destination">The stream to which the contents of the current stream will be copied.</param>
831 <param name="bufferSize">The size, in bytes, of the buffer. This value must be greater than zero.</param>
832 <param name="cancellationToken">The token to monitor for cancellation requests.</param>
833 <exception cref="T:System.ArgumentNullException">
834 <paramref name="destination" /> is <see langword="null" />.</exception>
835 <exception cref="T:System.ArgumentOutOfRangeException">
836 <paramref name="bufferSize" /> is not a positive number.</exception>
837 <exception cref="T:System.NotSupportedException">The stream does not support reading or writing.</exception>
838 <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
839 <exception cref="T:System.InvalidOperationException">Only one asynchronous reader or writer is allowed at a time.</exception>
840 <returns>A task that represents the asynchronous copy operation.</returns>
842 <member name="M:System.IO.Compression.ZLibStream.DisposeAsync">
843 <summary>Asynchronously releases all resources used by the stream.</summary>
844 <returns>A task that represents the completion of the disposal operation.</returns>
846 <member name="M:System.IO.Compression.ZLibStream.EndRead(System.IAsyncResult)">
847 <summary>Waits for the pending asynchronous read to complete.</summary>
848 <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
849 <returns>The number of bytes that were read into the byte array.</returns>
851 <member name="M:System.IO.Compression.ZLibStream.EndWrite(System.IAsyncResult)">
852 <summary>Ends an asynchronous write operation.</summary>
853 <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
855 <member name="M:System.IO.Compression.ZLibStream.Flush">
856 <summary>Flushes the internal buffers.</summary>
858 <member name="M:System.IO.Compression.ZLibStream.FlushAsync(System.Threading.CancellationToken)">
859 <summary>Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.</summary>
860 <param name="cancellationToken">The token to monitor for cancellation requests.</param>
861 <returns>A task that represents the asynchronous flush operation.</returns>
863 <member name="M:System.IO.Compression.ZLibStream.Read(System.Byte[],System.Int32,System.Int32)">
864 <summary>Reads a number of decompressed bytes into the specified byte array.</summary>
865 <param name="buffer">The byte array to read the data into.</param>
866 <param name="offset">The byte offset in array at which to begin reading data from the stream.</param>
867 <param name="count">The maximum number of bytes to read.</param>
868 <returns>The number of bytes that were read into the byte array.</returns>
870 <member name="M:System.IO.Compression.ZLibStream.Read(System.Span{System.Byte})">
871 <summary>Reads a number of decompressed bytes into the specified byte span.</summary>
872 <param name="buffer">The span to read the data into.</param>
873 <returns>The number of bytes that were read into the byte span.</returns>
875 <member name="M:System.IO.Compression.ZLibStream.ReadAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
876 <summary>Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests.</summary>
877 <param name="buffer">The byte array to read the data into.</param>
878 <param name="offset">The byte offset in array at which to begin reading data from the stream.</param>
879 <param name="count">The maximum number of bytes to read.</param>
880 <param name="cancellationToken">The token to monitor for cancellation requests.</param>
881 <returns>A task that represents the asynchronous completion of the operation.</returns>
883 <member name="M:System.IO.Compression.ZLibStream.ReadAsync(System.Memory{System.Byte},System.Threading.CancellationToken)">
884 <summary>Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests.</summary>
885 <param name="buffer">The byte span to read the data into.</param>
886 <param name="cancellationToken">The token to monitor for cancellation requests.</param>
887 <returns>A task that represents the asynchronous completion of the operation.</returns>
889 <member name="M:System.IO.Compression.ZLibStream.ReadByte">
890 <summary>Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.</summary>
891 <returns>The unsigned byte cast to an <see cref="T:System.Int32" />, or -1 if at the end of the stream.</returns>
893 <member name="M:System.IO.Compression.ZLibStream.Seek(System.Int64,System.IO.SeekOrigin)">
894 <summary>This method is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
895 <param name="offset">Not supported.</param>
896 <param name="origin">Not supported.</param>
897 <returns>This method is not supported and always throws a <see cref="T:System.NotSupportedException" />.</returns>
899 <member name="M:System.IO.Compression.ZLibStream.SetLength(System.Int64)">
900 <summary>This method is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
901 <param name="value">Not supported.</param>
903 <member name="M:System.IO.Compression.ZLibStream.Write(System.Byte[],System.Int32,System.Int32)">
904 <summary>Writes compressed bytes to the underlying stream from the specified byte array.</summary>
905 <param name="buffer">The buffer to write data from.</param>
906 <param name="offset">The byte offset in buffer to begin writing from.</param>
907 <param name="count">The maximum number of bytes to write.</param>
909 <member name="M:System.IO.Compression.ZLibStream.Write(System.ReadOnlySpan{System.Byte})">
910 <summary>Writes compressed bytes to the underlying stream from the specified byte span.</summary>
911 <param name="buffer">The buffer to write data from.</param>
913 <member name="M:System.IO.Compression.ZLibStream.WriteAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)">
914 <summary>Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.</summary>
915 <param name="buffer">The buffer to write data from.</param>
916 <param name="offset">The byte offset in buffer to begin writing from.</param>
917 <param name="count">The maximum number of bytes to write.</param>
918 <param name="cancellationToken">The token to monitor for cancellation requests.</param>
919 <returns>A task that represents the asynchronous completion of the operation.</returns>
921 <member name="M:System.IO.Compression.ZLibStream.WriteAsync(System.ReadOnlyMemory{System.Byte},System.Threading.CancellationToken)">
922 <summary>Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.</summary>
923 <param name="buffer">The buffer to write data from.</param>
924 <param name="cancellationToken">The token to monitor for cancellation requests.</param>
925 <returns>A task that represents the asynchronous completion of the operation.</returns>
927 <member name="M:System.IO.Compression.ZLibStream.WriteByte(System.Byte)">
928 <summary>Writes a byte to the current position in the stream and advances the position within the stream by one byte.</summary>
929 <param name="value">The byte to write to the stream.</param>
931 <member name="P:System.IO.Compression.ZLibStream.BaseStream">
932 <summary>Gets a reference to the underlying stream.</summary>
934 <member name="P:System.IO.Compression.ZLibStream.CanRead">
935 <summary>Gets a value indicating whether the stream supports reading.</summary>
937 <see langword="true" /> if the stream supports reading; <see langword="false" /> otherwise.</returns>
939 <member name="P:System.IO.Compression.ZLibStream.CanSeek">
940 <summary>Gets a value indicating whether the stream supports seeking.</summary>
942 <see langword="true" /> if the stream supports seeking; <see langword="false" /> otherwise.</returns>
944 <member name="P:System.IO.Compression.ZLibStream.CanWrite">
945 <summary>Gets a value indicating whether the stream supports writing.</summary>
947 <see langword="true" /> if the stream supports writing; <see langword="false" /> otherwise.</returns>
949 <member name="P:System.IO.Compression.ZLibStream.Length">
950 <summary>This property is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
951 <returns>This property is not supported and always throws a <see cref="T:System.NotSupportedException" />.</returns>
953 <member name="P:System.IO.Compression.ZLibStream.Position">
954 <summary>This property is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
955 <returns>This property is not supported and always throws a <see cref="T:System.NotSupportedException" />.</returns>