using System; namespace System.IO.Compression { /// Provides methods and properties used to compress and decompress streams. // Token: 0x0200010A RID: 266 public class GZipStream : Stream { /// Initializes a new instance of the class using the specified stream and value. /// The stream to compress or decompress. /// One of the values that indicates the action to take. /// /// is null. /// /// access right is ReadOnly and value is Compress. /// /// is not a valid enumeration value.-or- is and is false.-or- is and is false. // Token: 0x060009A8 RID: 2472 RVA: 0x00019A44 File Offset: 0x00017C44 public GZipStream(Stream compressedStream, CompressionMode mode) : this(compressedStream, mode, false) { } /// Initializes a new instance of the class using the specified stream and value, and a value that specifies whether to leave the stream open. /// The stream to compress or decompress. /// One of the values that indicates the action to take. /// true to leave the stream open; otherwise, false. /// /// is null. /// /// access right is ReadOnly and value is Compress. /// /// is not a valid value.-or- is and is false.-or- is and is false. // Token: 0x060009A9 RID: 2473 RVA: 0x00019A50 File Offset: 0x00017C50 public GZipStream(Stream compressedStream, CompressionMode mode, bool leaveOpen) { this.deflateStream = new DeflateStream(compressedStream, mode, leaveOpen, true); } /// Releases the unmanaged resources used by the and optionally releases the managed resources. /// true to release both managed and unmanaged resources; false to release only unmanaged resources. // Token: 0x060009AA RID: 2474 RVA: 0x00019A68 File Offset: 0x00017C68 protected override void Dispose(bool disposing) { if (disposing) { this.deflateStream.Dispose(); } base.Dispose(disposing); } /// Reads a number of decompressed bytes into the specified byte array. /// 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. /// The array used to store decompressed bytes. /// The byte offset in at which the read bytes will be placed. /// The number of bytes decompressed. /// /// is null. /// The value was Compress when the object was created.- or -The underlying stream does not support reading. /// /// or is less than zero.-or- length minus the index starting point is less than . /// The data is in an invalid format. /// The stream is closed. // Token: 0x060009AB RID: 2475 RVA: 0x00019A84 File Offset: 0x00017C84 public override int Read(byte[] dest, int dest_offset, int count) { return this.deflateStream.Read(dest, dest_offset, count); } /// Writes compressed bytes to the underlying stream from the specified byte array. /// The buffer that contains the data to compress. /// The byte offset in at which the compressed bytes will be placed. /// The number of bytes compressed. /// The write operation cannot be performed because the stream is closed. // Token: 0x060009AC RID: 2476 RVA: 0x00019A94 File Offset: 0x00017C94 public override void Write(byte[] src, int src_offset, int count) { this.deflateStream.Write(src, src_offset, count); } /// Flushes the contents of the internal buffer of the current object to the underlying stream. /// The stream is closed. /// /// /// // Token: 0x060009AD RID: 2477 RVA: 0x00019AA4 File Offset: 0x00017CA4 public override void Flush() { this.deflateStream.Flush(); } /// This property is not supported and always throws a . /// A long value. /// The location in the stream. /// One of the values. /// This property is not supported on this stream. // Token: 0x060009AE RID: 2478 RVA: 0x00019AB4 File Offset: 0x00017CB4 public override long Seek(long offset, SeekOrigin origin) { return this.deflateStream.Seek(offset, origin); } /// This property is not supported and always throws a . /// The length of the stream. /// This property is not supported on this stream. // Token: 0x060009AF RID: 2479 RVA: 0x00019AC4 File Offset: 0x00017CC4 public override void SetLength(long value) { this.deflateStream.SetLength(value); } /// Begins an asynchronous read operation. /// An object that represents the asynchronous read, which could still be pending. /// The byte array to read the data into. /// The byte offset in at which to begin writing data read from the stream. /// The maximum number of bytes to read. /// An optional asynchronous callback, to be called when the read is complete. /// A user-provided object that distinguishes this particular asynchronous read request from other requests. /// An asynchronous read past the end of the stream was attempted, or a disk error occurred. /// One or more of the arguments is invalid. /// Methods were called after the stream was closed. /// The current implementation does not support the read operation. /// A read operation cannot be performed because the stream is closed. // Token: 0x060009B0 RID: 2480 RVA: 0x00019AD4 File Offset: 0x00017CD4 public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback cback, object state) { return this.deflateStream.BeginRead(buffer, offset, count, cback, state); } /// Begins an asynchronous write operation. /// An object that represents the asynchronous write, which could still be pending. /// The buffer containing data to write to the current stream. /// The byte offset in at which to begin writing. /// The maximum number of bytes to write. /// An optional asynchronous callback to be called when the write is complete. /// A user-provided object that distinguishes this particular asynchronous write request from other requests. /// The underlying stream is null. -or-The underlying stream is closed. // Token: 0x060009B1 RID: 2481 RVA: 0x00019AE8 File Offset: 0x00017CE8 public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback cback, object state) { return this.deflateStream.BeginWrite(buffer, offset, count, cback, state); } /// Waits for the pending asynchronous read to complete. /// The number of bytes read from the stream, between zero (0) and the number of bytes you requested. returns zero (0) only at the end of the stream; otherwise, it blocks until at least one byte is available. /// The reference to the pending asynchronous request to finish. /// /// is null. /// /// did not originate from a method on the current stream. /// The end operation cannot be performed because the stream is closed. // Token: 0x060009B2 RID: 2482 RVA: 0x00019AFC File Offset: 0x00017CFC public override int EndRead(IAsyncResult async_result) { return this.deflateStream.EndRead(async_result); } /// Handles the end of an asynchronous write operation. /// The object that represents the asynchronous call. /// The underlying stream is null. -or-The underlying stream is closed. // Token: 0x060009B3 RID: 2483 RVA: 0x00019B0C File Offset: 0x00017D0C public override void EndWrite(IAsyncResult async_result) { this.deflateStream.EndWrite(async_result); } /// Gets a reference to the underlying stream. /// A stream object that represents the underlying stream. /// The underlying stream is closed. /// /// /// // Token: 0x17000285 RID: 645 // (get) Token: 0x060009B4 RID: 2484 RVA: 0x00019B1C File Offset: 0x00017D1C public Stream BaseStream { get { return this.deflateStream.BaseStream; } } /// Gets a value indicating whether the stream supports reading while decompressing a file. /// true if the value is Decompress, and the underlying stream supports reading and is not closed; otherwise, false. /// /// /// // Token: 0x17000286 RID: 646 // (get) Token: 0x060009B5 RID: 2485 RVA: 0x00019B2C File Offset: 0x00017D2C public override bool CanRead { get { return this.deflateStream.CanRead; } } /// Gets a value indicating whether the stream supports seeking. /// false in all cases. // Token: 0x17000287 RID: 647 // (get) Token: 0x060009B6 RID: 2486 RVA: 0x00019B3C File Offset: 0x00017D3C public override bool CanSeek { get { return this.deflateStream.CanSeek; } } /// Gets a value indicating whether the stream supports writing. /// true if the value is Compress, and the underlying stream supports writing and is not closed; otherwise, false. /// /// /// // Token: 0x17000288 RID: 648 // (get) Token: 0x060009B7 RID: 2487 RVA: 0x00019B4C File Offset: 0x00017D4C public override bool CanWrite { get { return this.deflateStream.CanWrite; } } /// This property is not supported and always throws a . /// A long value. /// This property is not supported on this stream. /// /// /// // Token: 0x17000289 RID: 649 // (get) Token: 0x060009B8 RID: 2488 RVA: 0x00019B5C File Offset: 0x00017D5C public override long Length { get { return this.deflateStream.Length; } } /// This property is not supported and always throws a . /// A long value. /// This property is not supported on this stream. /// /// /// // Token: 0x1700028A RID: 650 // (get) Token: 0x060009B9 RID: 2489 RVA: 0x00019B6C File Offset: 0x00017D6C // (set) Token: 0x060009BA RID: 2490 RVA: 0x00019B7C File Offset: 0x00017D7C public override long Position { get { return this.deflateStream.Position; } set { this.deflateStream.Position = value; } } // Token: 0x04000329 RID: 809 private DeflateStream deflateStream; } }