Files
2026-04-10 22:50:51 +02:00

353 lines
19 KiB
C#

using System;
using Cpp2IlInjected;
namespace System.IO.Compression
{
/// <summary>Provides methods and properties for compressing and decompressing streams by using the Deflate algorithm.</summary>
// Token: 0x02000210 RID: 528
[Token(Token = "0x2000210")]
public class DeflateStream : Stream
{
/// <summary>Initializes a new instance of the <see cref="T:System.IO.Compression.DeflateStream" /> class by using the specified stream and compression mode.</summary>
/// <param name="stream">The stream to compress or decompress.</param>
/// <param name="mode">One of the enumeration values that indicates whether to compress or decompress the stream.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="stream" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="mode" /> is not a valid <see cref="T:System.IO.Compression.CompressionMode" /> value.
/// -or-
/// <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" />.
/// -or-
/// <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>
// Token: 0x06000D83 RID: 3459 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D83")]
[Address(RVA = "0x28A4F60", Offset = "0x28A3D60", VA = "0x1828A4F60")]
public DeflateStream(Stream stream, CompressionMode mode)
{
}
/// <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>
/// <param name="stream">The stream to compress or decompress.</param>
/// <param name="mode">One of the enumeration values that indicates whether to compress or decompress the stream.</param>
/// <param name="leaveOpen">
/// <see langword="true" /> to leave the stream open after disposing the <see cref="T:System.IO.Compression.DeflateStream" /> object; otherwise, <see langword="false" />.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="stream" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="mode" /> is not a valid <see cref="T:System.IO.Compression.CompressionMode" /> value.
/// -or-
/// <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" />.
/// -or-
/// <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>
// Token: 0x06000D84 RID: 3460 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D84")]
[Address(RVA = "0x28A51E0", Offset = "0x28A3FE0", VA = "0x1828A51E0")]
public DeflateStream(Stream stream, CompressionMode mode, bool leaveOpen)
{
}
// Token: 0x06000D85 RID: 3461 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D85")]
[Address(RVA = "0x28A4F40", Offset = "0x28A3D40", VA = "0x1828A4F40")]
internal DeflateStream(Stream stream, CompressionMode mode, bool leaveOpen, int windowsBits)
{
}
// Token: 0x06000D86 RID: 3462 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D86")]
[Address(RVA = "0x28A4F80", Offset = "0x28A3D80", VA = "0x1828A4F80")]
internal DeflateStream(Stream compressedStream, CompressionMode mode, bool leaveOpen, bool gzip)
{
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.IO.Compression.DeflateStream" /> and optionally releases the managed resources.</summary>
/// <param name="disposing">
/// <see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
// Token: 0x06000D87 RID: 3463 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D87")]
[Address(RVA = "0x28A4300", Offset = "0x28A3100", VA = "0x1828A4300", Slot = "16")]
protected override void Dispose(bool disposing)
{
}
// Token: 0x06000D88 RID: 3464 RVA: 0x00006E10 File Offset: 0x00005010
[Token(Token = "0x6000D88")]
[Address(RVA = "0x28A4790", Offset = "0x28A3590", VA = "0x1828A4790")]
private int ReadInternal(byte[] array, int offset, int count)
{
return 0;
}
/// <summary>Reads a number of decompressed bytes into the specified byte array.</summary>
/// <param name="array">The array to store decompressed bytes.</param>
/// <param name="offset">The byte offset in <paramref name="array" /> at which the read bytes will be placed.</param>
/// <param name="count">The maximum number of decompressed bytes to read.</param>
/// <returns>The number of bytes that were read into the byte array.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="array" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.IO.Compression.CompressionMode" /> value was <see langword="Compress" /> when the object was created.
/// -or-
/// The underlying stream does not support reading.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> or <paramref name="count" /> is less than zero.
/// -or-
/// <paramref name="array" /> length minus the index starting point is less than <paramref name="count" />.</exception>
/// <exception cref="T:System.IO.InvalidDataException">The data is in an invalid format.</exception>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x06000D89 RID: 3465 RVA: 0x00006E28 File Offset: 0x00005028
[Token(Token = "0x6000D89")]
[Address(RVA = "0x28A4880", Offset = "0x28A3680", VA = "0x1828A4880", Slot = "27")]
public override int Read(byte[] array, int offset, int count)
{
return 0;
}
// Token: 0x06000D8A RID: 3466 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D8A")]
[Address(RVA = "0x28A4BC0", Offset = "0x28A39C0", VA = "0x1828A4BC0")]
private void WriteInternal(byte[] array, int offset, int count)
{
}
/// <summary>Writes compressed bytes to the underlying stream from the specified byte array.</summary>
/// <param name="array">The buffer that contains the data to compress.</param>
/// <param name="offset">The byte offset in <paramref name="array" /> from which the bytes will be read.</param>
/// <param name="count">The maximum number of bytes to write.</param>
// Token: 0x06000D8B RID: 3467 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D8B")]
[Address(RVA = "0x28A4CA0", Offset = "0x28A3AA0", VA = "0x1828A4CA0", Slot = "29")]
public override void Write(byte[] array, int offset, int count)
{
}
/// <summary>The current implementation of this method has no functionality.</summary>
/// <exception cref="T:System.ObjectDisposedException">The stream is closed.</exception>
// Token: 0x06000D8C RID: 3468 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D8C")]
[Address(RVA = "0x28A4650", Offset = "0x28A3450", VA = "0x1828A4650", Slot = "17")]
public override void Flush()
{
}
/// <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>
/// <param name="array">The byte array to read the data into.</param>
/// <param name="offset">The byte offset in <paramref name="array" /> at which to begin reading data from the stream.</param>
/// <param name="count">The maximum number of bytes to read.</param>
/// <param name="asyncCallback">An optional asynchronous callback, to be called when the read operation is complete.</param>
/// <param name="asyncState">A user-provided object that distinguishes this particular asynchronous read request from other requests.</param>
/// <returns>An object that represents the asynchronous read operation, which could still be pending.</returns>
/// <exception cref="T:System.IO.IOException">The method tried to read asynchronously past the end of the stream, or a disk error occurred.</exception>
/// <exception cref="T:System.ArgumentException">One or more of the arguments is invalid.</exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
/// <exception cref="T:System.NotSupportedException">The current <see cref="T:System.IO.Compression.DeflateStream" /> implementation does not support the read operation.</exception>
/// <exception cref="T:System.InvalidOperationException">This call cannot be completed.</exception>
// Token: 0x06000D8D RID: 3469 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000D8D")]
[Address(RVA = "0x28A3DC0", Offset = "0x28A2BC0", VA = "0x1828A3DC0", Slot = "19")]
public override IAsyncResult BeginRead(byte[] array, int offset, int count, AsyncCallback asyncCallback, object asyncState)
{
return null;
}
/// <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>
/// <param name="array">The buffer to write data from.</param>
/// <param name="offset">The byte offset in <paramref name="buffer" /> to begin writing from.</param>
/// <param name="count">The maximum number of bytes to write.</param>
/// <param name="asyncCallback">An optional asynchronous callback, to be called when the write operation is complete.</param>
/// <param name="asyncState">A user-provided object that distinguishes this particular asynchronous write request from other requests.</param>
/// <returns>An object that represents the asynchronous write operation, which could still be pending.</returns>
/// <exception cref="T:System.IO.IOException">The method tried to write asynchronously past the end of the stream, or a disk error occurred.</exception>
/// <exception cref="T:System.ArgumentException">One or more of the arguments is invalid.</exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed.</exception>
/// <exception cref="T:System.NotSupportedException">The current <see cref="T:System.IO.Compression.DeflateStream" /> implementation does not support the write operation.</exception>
/// <exception cref="T:System.InvalidOperationException">The write operation cannot be performed because the stream is closed.</exception>
// Token: 0x06000D8E RID: 3470 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000D8E")]
[Address(RVA = "0x28A4060", Offset = "0x28A2E60", VA = "0x1828A4060", Slot = "22")]
public override IAsyncResult BeginWrite(byte[] array, int offset, int count, AsyncCallback asyncCallback, object asyncState)
{
return null;
}
/// <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>
/// <param name="asyncResult">The reference to the pending asynchronous request to finish.</param>
/// <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>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="asyncResult" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <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>
/// <exception cref="T:System.SystemException">An exception was thrown during a call to <see cref="M:System.Threading.WaitHandle.WaitOne" />.</exception>
/// <exception cref="T:System.InvalidOperationException">The end call is invalid because asynchronous read operations for this stream are not yet complete.
/// -or-
/// The stream is <see langword="null" />.</exception>
// Token: 0x06000D8F RID: 3471 RVA: 0x00006E40 File Offset: 0x00005040
[Token(Token = "0x6000D8F")]
[Address(RVA = "0x28A4380", Offset = "0x28A3180", VA = "0x1828A4380", Slot = "20")]
public override int EndRead(IAsyncResult asyncResult)
{
return 0;
}
/// <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>
/// <param name="asyncResult">A reference to the outstanding asynchronous I/O request.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="asyncResult" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <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>
/// <exception cref="T:System.Exception">An exception was thrown during a call to <see cref="M:System.Threading.WaitHandle.WaitOne" />.</exception>
/// <exception cref="T:System.InvalidOperationException">The stream is <see langword="null" />.
/// -or-
/// The end write call is invalid.</exception>
// Token: 0x06000D90 RID: 3472 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D90")]
[Address(RVA = "0x28A44F0", Offset = "0x28A32F0", VA = "0x1828A44F0", Slot = "23")]
public override void EndWrite(IAsyncResult asyncResult)
{
}
/// <summary>This operation is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
/// <param name="offset">The location in the stream.</param>
/// <param name="origin">One of the <see cref="T:System.IO.SeekOrigin" /> values.</param>
/// <returns>A long value.</returns>
/// <exception cref="T:System.NotSupportedException">This property is not supported on this stream.</exception>
// Token: 0x06000D91 RID: 3473 RVA: 0x00006E58 File Offset: 0x00005058
[Token(Token = "0x6000D91")]
[Address(RVA = "0x28A4B20", Offset = "0x28A3920", VA = "0x1828A4B20", Slot = "25")]
public override long Seek(long offset, SeekOrigin origin)
{
return 0L;
}
/// <summary>This operation is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
/// <param name="value">The length of the stream.</param>
/// <exception cref="T:System.NotSupportedException">This property is not supported on this stream.</exception>
// Token: 0x06000D92 RID: 3474 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6000D92")]
[Address(RVA = "0x28A4B70", Offset = "0x28A3970", VA = "0x1828A4B70", Slot = "26")]
public override void SetLength(long value)
{
}
/// <summary>Gets a value indicating whether the stream supports reading while decompressing a file.</summary>
/// <returns>
/// <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>
// Token: 0x17000283 RID: 643
// (get) Token: 0x06000D93 RID: 3475 RVA: 0x00006E70 File Offset: 0x00005070
[Token(Token = "0x17000283")]
public override bool CanRead
{
[Token(Token = "0x6000D93")]
[Address(RVA = "0x28A5200", Offset = "0x28A4000", VA = "0x1828A5200", Slot = "7")]
get
{
return default(bool);
}
}
/// <summary>Gets a value indicating whether the stream supports seeking.</summary>
/// <returns>
/// <see langword="false" /> in all cases.</returns>
// Token: 0x17000284 RID: 644
// (get) Token: 0x06000D94 RID: 3476 RVA: 0x00006E88 File Offset: 0x00005088
[Token(Token = "0x17000284")]
public override bool CanSeek
{
[Token(Token = "0x6000D94")]
[Address(RVA = "0x403930", Offset = "0x402730", VA = "0x180403930", Slot = "8")]
get
{
return default(bool);
}
}
/// <summary>Gets a value indicating whether the stream supports writing.</summary>
/// <returns>
/// <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>
// Token: 0x17000285 RID: 645
// (get) Token: 0x06000D95 RID: 3477 RVA: 0x00006EA0 File Offset: 0x000050A0
[Token(Token = "0x17000285")]
public override bool CanWrite
{
[Token(Token = "0x6000D95")]
[Address(RVA = "0x28A5240", Offset = "0x28A4040", VA = "0x1828A5240", Slot = "9")]
get
{
return default(bool);
}
}
/// <summary>This property is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
/// <returns>A long value.</returns>
/// <exception cref="T:System.NotSupportedException">This property is not supported on this stream.</exception>
// Token: 0x17000286 RID: 646
// (get) Token: 0x06000D96 RID: 3478 RVA: 0x00006EB8 File Offset: 0x000050B8
[Token(Token = "0x17000286")]
public override long Length
{
[Token(Token = "0x6000D96")]
[Address(RVA = "0x28A5280", Offset = "0x28A4080", VA = "0x1828A5280", Slot = "10")]
get
{
return 0L;
}
}
/// <summary>This property is not supported and always throws a <see cref="T:System.NotSupportedException" />.</summary>
/// <returns>A long value.</returns>
/// <exception cref="T:System.NotSupportedException">This property is not supported on this stream.</exception>
// Token: 0x17000287 RID: 647
// (get) Token: 0x06000D97 RID: 3479 RVA: 0x00006ED0 File Offset: 0x000050D0
// (set) Token: 0x06000D98 RID: 3480 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x17000287")]
public override long Position
{
[Token(Token = "0x6000D97")]
[Address(RVA = "0x28A52D0", Offset = "0x28A40D0", VA = "0x1828A52D0", Slot = "11")]
get
{
return 0L;
}
[Token(Token = "0x6000D98")]
[Address(RVA = "0x28A5320", Offset = "0x28A4120", VA = "0x1828A5320", Slot = "12")]
set
{
}
}
// Token: 0x0400076C RID: 1900
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x400076C")]
private Stream base_stream;
// Token: 0x0400076D RID: 1901
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x400076D")]
private CompressionMode mode;
// Token: 0x0400076E RID: 1902
[FieldOffset(Offset = "0x34")]
[Token(Token = "0x400076E")]
private bool leaveOpen;
// Token: 0x0400076F RID: 1903
[FieldOffset(Offset = "0x35")]
[Token(Token = "0x400076F")]
private bool disposed;
// Token: 0x04000770 RID: 1904
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x4000770")]
private DeflateStreamNative native;
// Token: 0x02000211 RID: 529
// (Invoke) Token: 0x06000D9A RID: 3482
[Token(Token = "0x2000211")]
private delegate int ReadMethod(byte[] array, int offset, int count);
// Token: 0x02000212 RID: 530
// (Invoke) Token: 0x06000D9E RID: 3486
[Token(Token = "0x2000212")]
private delegate void WriteMethod(byte[] array, int offset, int count);
}
}