ZlibStream Class

DotNetZip

Ionic Zip Library v1.9.1.6 ZlibStream Class
ReferenceIonic.ZlibZlibStream
Represents a Zlib stream for compression or decompression.
Declaration Syntax
C# Visual Basic Visual C++
public class ZlibStream : Stream
Public Class ZlibStream _
	Inherits Stream
public ref class ZlibStream : public Stream
Members
All Members Constructors Methods Properties



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

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

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

ZlibStream(Stream, CompressionMode, CompressionLevel, Boolean)
Create a ZlibStream 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 ZLIB.

CompressString(String)
Compress a string into a byte array using ZLIB.

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. Sorry, though, not sure exactly how to describe all the various settings.

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 NotSupportedException.
(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 NotSupportedException.
(Overrides Stream.Seek(Int64, SeekOrigin).)
SetLength(Int64)
Calling this method always throws a NotSupportedException.
(Overrides Stream.SetLength(Int64).)
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 ZLIB-compressed byte array into a byte array.

UncompressString(array<Byte>[]()[][])
Uncompress a ZLIB-compressed 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 ZlibStream is a Decorator on a Stream. It adds ZLIB 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 ZLIB, which is documented in IETF RFC 1950, "ZLIB Compressed Data Format Specification version 3.3". This implementation of ZLIB always uses DEFLATE as the compression method. (see IETF RFC 1951, "DEFLATE Compressed Data Format Specification version 1.3.")

The ZLIB format allows for varying compression methods, window sizes, and dictionaries. This implementation always uses the DEFLATE compression method, a preset dictionary, and 15 window bits by default.

This class is similar to DeflateStream, except that it adds the RFC1950 header and trailer bytes to a compressed stream when compressing, or expects the RFC1950 header and trailer bytes when decompressing. It is also similar to the GZipStream.

Inheritance Hierarchy
Object
MarshalByRefObject
  Stream
    ZlibStream

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