System 2.0.0.0 4.0.0.0 System.IO.Stream This class represents the gzip data format, which uses an industry-standard algorithm for lossless file compression and decompression. The format includes a cyclic redundancy check value for detecting data corruption. The gzip data format uses the same algorithm as the class, but can be extended to use other compression formats. The format can be readily implemented in a manner not covered by patents. Starting with the net_v45, the class uses the zlib library for compression. As a result, it provides a better compression algorithm and, in most cases, a smaller compressed file than it provides in earlier versions of the .NET Framework. Compressed objects written to a file with an extension of .gz can be decompressed using many common compression tools; however, this class does not inherently provide functionality for adding files to or extracting files from zip archives. The compression functionality in and is exposed as a stream. Data is read on a byte-by-byte basis, so it is not possible to perform multiple passes to determine the best method for compressing entire files or large blocks of data. The and classes are best used on uncompressed sources of data. If the source data is already compressed, using these classes may actually increase the size of the stream. Provides methods and properties used to compress and decompress streams. Constructor 4.0.0.0 System.MonoTODO You use this constructor when you want to specify whether compression efficiency or speed is more important for an instance of the class. This constructor overload uses the compression mode . To set the compression mode to another value, use the or overload. Initializes a new instance of the class by using the specified stream and compression level. The stream to compress. One of the enumeration values that indicates whether to emphasize speed or compression efficiency when compressing the stream. Constructor 2.0.0.0 4.0.0.0 To be added. By default, owns the underlying stream, so closing the parameter also closes the underlying stream. Note that the state of the underlying stream can affect the usability of the stream. Also, no explicit checks are performed, so no additional exceptions are thrown when the new instance is created. If an instance of the class is created with the parameter equal to Compress and no further action occurs, the stream will appear as a valid, empty compressed file. By default, the compression level is set to when the compression mode is . Initializes a new instance of the class by using the specified stream and compression mode. One of the enumeration values that indicates whether to compress or decompress the stream. Constructor 4.0.0.0 System.MonoTODO You use this constructor when you want to specify whether compression efficiency or speed is more important for an instance of the class, and whether to leave the stream object open after disposing the object. This constructor overload uses the compression mode . To set the compression mode to another value, use the or overload. Initializes a new instance of the class by using the specified stream and compression level, and optionally leaves the stream open. The stream to compress. One of the enumeration values that indicates whether to emphasize speed or compression efficiency when compressing the stream. true to leave the stream object open after disposing the object; otherwise, false. Constructor 2.0.0.0 4.0.0.0 To be added. By default, owns the underlying stream, so closing the parameter also closes the underlying stream. Note that the state of the underlying stream can affect the usability of the stream. Also, no explicit checks are performed, so no additional exceptions are thrown when the new instance is created. If an instance of the class is created with the parameter equal to Compress and no further action occurs, the stream will appear as a valid, empty compressed file. By default, the compression level is set to when the compression mode is . Initializes a new instance of the class by using the specified stream and compression mode, and optionally leaves the stream open. One of the enumeration values that indicates whether to compress or decompress the stream. true to leave the stream open after disposing the object; otherwise, false. Property 2.0.0.0 4.0.0.0 System.IO.Stream To be added. To be added. Gets a reference to the underlying stream. Method 2.0.0.0 4.0.0.0 System.IAsyncResult To be added. To be added. To be added. Starting with the net_v45, you can perform asynchronous read operations by using the method. The method is still available in net_v45 to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see Asynchronous File I/O. Pass the return value to the method of the stream to determine how many bytes were read and to release operating system resources used for reading. You can do this either by using the same code that called or in a callback passed to . The current position in the stream is updated when the asynchronous read or write is issued, not when the I/O operation completes. Multiple simultaneous asynchronous requests render the request completion order uncertain. Use the property to determine whether the current object supports reading. If a stream is closed or you pass an invalid argument, exceptions are thrown immediately from . Errors that occur during an asynchronous read request, such as a disk failure during the I/O request, occur on the thread pool thread and throw exceptions when calling . Begins an asynchronous read operation. (Consider using the method instead; see the Remarks section.) An object that represents the asynchronous read operation, which could still be pending. The byte offset in at which to begin reading data from the stream. The maximum number of bytes to read. Method 2.0.0.0 4.0.0.0 System.IAsyncResult To be added. To be added. To be added. Starting with the net_v45, you can perform asynchronous write operations by using the method. The method is still available in net_v45 to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see Asynchronous File I/O. The method starts an asynchronous write operation to a stream object. You must create a callback method that implements the delegate and pass its name to the method. Begins an asynchronous write operation. (Consider using the method instead; see the Remarks section.) An object that represents the asynchronous write operation, which could still be pending. The byte offset in at which to begin writing. The maximum number of bytes to write. Property 2.0.0.0 4.0.0.0 System.Boolean To be added. To be added. Gets a value indicating whether the stream supports reading while decompressing a file. Property 2.0.0.0 4.0.0.0 System.Boolean To be added. To be added. Gets a value indicating whether the stream supports seeking. Property 2.0.0.0 4.0.0.0 System.Boolean To be added. To be added. Gets a value indicating whether the stream supports writing. Method 2.0.0.0 4.0.0.0 System.Void This method is called by the public method and the method. invokes the protected method with the parameter set to true. invokes with set to false. When the parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the method of each referenced object. 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. Method 2.0.0.0 4.0.0.0 System.Int32 To be added. Starting with the net_v45, you can perform asynchronous read operations by using the method. The method is still available in net_v45 to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see Asynchronous File I/O. Call this method to determine how many bytes were read from the stream. This method can be called once to return the amount of bytes read between calls to and . This method blocks until the I/O operation has completed. Waits for the pending asynchronous read to complete. (Consider using the the method instead; see the Remarks section.) The number of bytes read from the stream, between 0 (zero) and the number of bytes you requested. returns 0 only at the end of the stream; otherwise, it blocks until at least one byte is available. Method 2.0.0.0 4.0.0.0 System.Void To be added. Starting with the net_v45, you can perform asynchronous write operations by using the method. The method is still available in net_v45 to support legacy code; however, you can implement asynchronous I/O operations more easily by using the new async methods. For more information, see Asynchronous File I/O. The method completes the asynchronous write operation started in the method. Handles the end of an asynchronous write operation. (Consider using the method instead; see the Remarks section.) Method 2.0.0.0 4.0.0.0 System.Void The current implementation of this method does not flush the internal buffer. The internal buffer is flushed when the object is disposed. The current implementation of this method has no functionality. Property 2.0.0.0 4.0.0.0 System.Int64 To be added. To be added. This property is not supported and always throws a . Property 2.0.0.0 4.0.0.0 System.Int64 To be added. To be added. This property is not supported and always throws a . Method 2.0.0.0 4.0.0.0 System.Int32 To be added. To be added. If data is found in an invalid format, an is thrown as one of the last operations. A cyclic redundancy check (CRC) is performed as one of the last operations of this method. 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 maximum number of decompressed bytes to read. Method 2.0.0.0 4.0.0.0 System.Int64 To be added. This property is not supported and always throws a . A long value. The location in the stream. One of the values. Method 2.0.0.0 4.0.0.0 System.Void To be added. This property is not supported and always throws a . The length of the stream. Method 2.0.0.0 4.0.0.0 System.Void To be added. To be added. The write operation might not occur immediately but is buffered until the buffer size is reached or until the or method is called. Writes compressed bytes to the underlying stream from the specified byte array. The maximum number of bytes to write.