Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

GzipCompressionStream Class

Namespace: Rebex.IO.Compression.Streams
Assembly: Rebex.Zip.dll (version 7.0.9147)

Provides a stream that uses RFC 1952 - GZIP implementation to compress data. If opened for writing it compresses specified data and writes the compressed data into an underlying stream. If opened for reading it reads an uncompressed data from the underlying stream and returns a compressed data. Unlike similar class present in .NET Framework 2.0, this one actually makes it possible to use Flush when compressing data to make sure all data written to the stream have been written into the underlying stream as well.

Syntax
public class GzipCompressionStream : CompressionStream, IAsyncDisposable, IDisposable
Inheritance
Object
MarshalByRefObject
Stream
CompressionStream
GzipCompressionStream
Implements
IAsyncDisposable
IDisposable
Inherited Members
CompressionStream.CanRead
CompressionStream.CanSeek
CompressionStream.CanWrite
CompressionStream.DefaultCompressionLevel
CompressionStream.Dispose(Boolean)
CompressionStream.Flush()
CompressionStream.Length
CompressionStream.Position
CompressionStream.Read(Byte[], Int32, Int32)
CompressionStream.Seek(Int64, SeekOrigin)
CompressionStream.SetLength(Int64)
CompressionStream.Write(Byte[], Int32, Int32)
Stream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object)
Stream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object)
Stream.CanTimeout
Stream.Close()
Stream.CopyTo(Stream)
Stream.CopyTo(Stream, Int32)
Stream.CopyToAsync(Stream)
Stream.CopyToAsync(Stream, Int32)
Stream.CopyToAsync(Stream, Int32, CancellationToken)
Stream.CopyToAsync(Stream, CancellationToken)
Stream.CreateWaitHandle()
Stream.Dispose()
Stream.DisposeAsync()
Stream.EndRead(IAsyncResult)
Stream.EndWrite(IAsyncResult)
Stream.FlushAsync()
Stream.FlushAsync(CancellationToken)
Stream.Null
Stream.ObjectInvariant()
Stream.Read(Span<Byte>)
Stream.ReadAsync(Byte[], Int32, Int32)
Stream.ReadAsync(Byte[], Int32, Int32, CancellationToken)
Stream.ReadAsync(Memory<Byte>, CancellationToken)
Stream.ReadAtLeast(Span<Byte>, Int32, Boolean)
Stream.ReadAtLeastAsync(Memory<Byte>, Int32, Boolean, CancellationToken)
Stream.ReadByte()
Stream.ReadExactly(Byte[], Int32, Int32)
Stream.ReadExactly(Span<Byte>)
Stream.ReadExactlyAsync(Byte[], Int32, Int32, CancellationToken)
Stream.ReadExactlyAsync(Memory<Byte>, CancellationToken)
Stream.ReadTimeout
Stream.Synchronized(Stream)
Stream.ValidateBufferArguments(Byte[], Int32, Int32)
Stream.ValidateCopyToArguments(Stream, Int32)
Stream.Write(ReadOnlySpan<Byte>)
Stream.WriteAsync(Byte[], Int32, Int32)
Stream.WriteAsync(Byte[], Int32, Int32, CancellationToken)
Stream.WriteAsync(ReadOnlyMemory<Byte>, CancellationToken)
Stream.WriteByte(Byte)
Stream.WriteTimeout
MarshalByRefObject.GetLifetimeService()
MarshalByRefObject.InitializeLifetimeService()
MarshalByRefObject.MemberwiseClone(Boolean)
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()

Constructors

Name Description
GzipCompressionStream(Stream, OpenMode)

Creates a new instance of GzipCompressionStream class.

GzipCompressionStream(Stream, OpenMode, Int32)

Creates a new instance of GzipCompressionStream class.

GzipCompressionStream(Stream, OpenMode, Int32, String, Nullable<DateTime>, String)

Creates a new instance of GzipCompressionStream class.

GzipCompressionStream(Stream, OpenMode, String)

Creates a new instance of GzipCompressionStream class.

Fields

Name Description
DefaultCompressionLevel

The default compression level. Inherited from CompressionStream.

Properties

Name Description
CanRead

Gets a value indicating whether the stream supports reading. Inherited from CompressionStream.

CanSeek

Gets a value indicating whether the stream supports seeking. Inherited from CompressionStream.

CanWrite

Gets a value indicating whether the stream supports writing. Inherited from CompressionStream.

Comment

Gets a comment stored in GZIP header.

FileName

Gets a file name stored in GZIP header.

LastWriteTime

Gets a last modification time stored in GZIP header.

Length

This property is not supported by the CompressionStream class. Inherited from CompressionStream.

Position

This property is not supported by the CompressionStream class. Inherited from CompressionStream.

Methods

Name Description
Dispose(Boolean)

Closes the underlying stream. Inherited from CompressionStream.

Flush()

Causes any buffered data to be written to the underlying stream. Inherited from CompressionStream.

Read(Byte[], Int32, Int32)

Reads data from the underlying stream, compressing them during the process. Inherited from CompressionStream.

Seek(Int64, SeekOrigin)

This method is not supported by the CompressionStream class. Inherited from CompressionStream.

SetLength(Int64)

This method is not supported by the CompressionStream class. Inherited from CompressionStream.

StartNextFile()

Finishes current file and writes new GZIP header for next file into the underlying stream.

StartNextFile(String, Nullable<DateTime>, String)

Finishes current file and writes new GZIP header for next file into the underlying stream.

Write(Byte[], Int32, Int32)

Writes a sequence of bytes into the stream. The sequence will be compressed and the result written into the underlying stream. Inherited from CompressionStream.

In This Article
  • Constructors
  • Fields
  • Properties
  • Methods
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies