DeflateStream Class

DotNetZip

Ionic Zip Library v1.9.1.6 DeflateStream Class
ReferenceIonic.ZlibDeflateStream
A class for compressing and decompressing streams using the Deflate algorithm.
Declaration Syntax
C# Visual Basic Visual C++
public class DeflateStream : Stream
Public Class DeflateStream _
	Inherits Stream
public ref class DeflateStream : public Stream
Members
All Members Constructors Methods Properties



Icon Member Description
DeflateStream(Stream, CompressionMode)
Create a DeflateStream using the specified CompressionMode.

DeflateStream(Stream, CompressionMode, CompressionLevel)
Create a DeflateStream using the specified CompressionMode and the specified CompressionLevel.

DeflateStream(Stream, CompressionMode, Boolean)
Create a DeflateStream using the specified CompressionMode, and explicitly specify whether the stream should be left open after Deflation or Inflation.

DeflateStream(Stream, CompressionMode, CompressionLevel, Boolean)
Create a DeflateStream using the specified CompressionMode and the specified CompressionLevel, and explicitly specify whether the stream should be left open after Deflation or Inflation.

BeginRead(array<Byte>[]()[][], Int32, Int32, AsyncCallback, Object) HostProtectionAttribute.
Begins an asynchronous read operation.
(Inherited from Stream.)
BeginWrite(array<Byte>[]()[][], Int32, Int32, AsyncCallback, Object) HostProtectionAttribute.
Begins an asynchronous write operation.
(Inherited from Stream.)
BufferSize
The size of the working buffer for the compression codec.

CanRead
Indicates whether the stream can be read.
(Overrides Stream.CanRead.)
CanSeek
Indicates whether the stream supports Seek operations.
(Overrides Stream.CanSeek.)
CanTimeout
Gets a value that determines whether the current stream can time out.
(Inherited from Stream.)
CanWrite
Indicates whether the stream can be written.
(Overrides Stream.CanWrite.)
Close()()()()
Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
(Inherited from Stream.)
CompressBuffer(array<Byte>[]()[][])
Compress a byte array into a new byte array using DEFLATE.

CompressString(String)
Compress a string into a byte array using DEFLATE (RFC 1951).

CreateObjRef(Type)
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
CreateWaitHandle()()()() Obsolete.
Allocates a WaitHandle object.
(Inherited from Stream.)
Dispose(Boolean)
Dispose the stream.
(Overrides Stream.Dispose(Boolean).)
Dispose()()()()
Releases all resources used by the Stream.
(Inherited from Stream.)
EndRead(IAsyncResult)
Waits for the pending asynchronous read to complete.
(Inherited from Stream.)
EndWrite(IAsyncResult)
Ends an asynchronous write operation.
(Inherited from Stream.)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Flush()()()()
Flush the stream.
(Overrides Stream.Flush()()()().)
FlushMode
This property sets the flush behavior on the stream.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetLifetimeService()()()()
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
InitializeLifetimeService()()()()
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Length
Reading this property always throws a NotImplementedException.
(Overrides Stream.Length.)
MemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Position
The position of the stream pointer.
(Overrides Stream.Position.)
Read(array<Byte>[]()[][], Int32, Int32)
Read data from the stream.
(Overrides Stream.Read(array<Byte>[]()[][], Int32, Int32).)
ReadByte()()()()
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.
(Inherited from Stream.)
ReadTimeout
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
(Inherited from Stream.)
Seek(Int64, SeekOrigin)
Calling this method always throws a NotImplementedException.
(Overrides Stream.Seek(Int64, SeekOrigin).)
SetLength(Int64)
Calling this method always throws a NotImplementedException.
(Overrides Stream.SetLength(Int64).)
Strategy
The ZLIB strategy to be used during compression.

ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
TotalIn
Returns the total number of bytes input so far.

TotalOut
Returns the total number of bytes output so far.

UncompressBuffer(array<Byte>[]()[][])
Uncompress a DEFLATE'd byte array into a byte array.

UncompressString(array<Byte>[]()[][])
Uncompress a DEFLATE'd byte array into a single string.

Write(array<Byte>[]()[][], Int32, Int32)
Write data to the stream.
(Overrides Stream.Write(array<Byte>[]()[][], Int32, Int32).)
WriteByte(Byte)
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
(Inherited from Stream.)
WriteTimeout
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.
(Inherited from Stream.)
Remarks

The DeflateStream is a Decorator on a Stream. It adds DEFLATE compression or decompression to any stream.

Using this stream, applications can compress or decompress data via stream Read and Write operations. Either compresssion or decompression can occur through either reading or writing. The compression format used is DEFLATE, which is documented in IETF RFC 1951, "DEFLATE Compressed Data Format Specification version 1.3.".

This class is similar to ZlibStream, except that ZlibStream adds the RFC 1950 - ZLIB framing bytes to a compressed stream when compressing, or expects the RFC1950 framing bytes when decompressing. The DeflateStream does not.

Inheritance Hierarchy
Object
MarshalByRefObject
  Stream
    DeflateStream

Assembly: Ionic.Zip (Module: Ionic.Zip) Version: 1.9.1.8 (1.9.1.8)