DotZLib

DotZLib .Net wrapper for ZLib1.dll

DotZLib Namespace

Classes

Class | Description
AdlerChecksum | Implements a checksum generator that computes the Adler checksum on data
ChecksumGeneratorBase | Implements the common functionality needed for all ChecksumGenerators
CodecBase | Implements the common functionality needed for all Codecs
CRC32Checksum | Implements a CRC32 checksum generator
Deflater | Implements a data compressor, using the deflate algorithm in the ZLib dll
GZipStream | Implements a compressed Stream, in GZip (.gz) format.
Inflater | Implements a data decompressor, using the inflate algorithm in the ZLib dll
Info | Encapsulates general information about the ZLib library
ZLibException | The exception that is thrown when an error occurs on the zlib dll

Interfaces

Interface | Description
ChecksumGenerator | Declares methods and properties that enables a running checksum to be calculated
Codec | Declares methods and events for implementing compressors/decompressors

Delegates

Delegate | Description
DataAvailableHandler | Represents the method that will be called from a codec when new data are available.

Enumerations

Enumeration | Description
CompressLevel | Defines constants for the available compression levels in zlib

Copyright 2004 Henrik Ravn


AdlerChecksum Class

Implements a checksum generator that computes the Adler checksum on data

For a list of all members of this type, see AdlerChecksum Members.

System.Object
ChecksumGeneratorBase
AdlerChecksum

public sealed class AdlerChecksum : ChecksumGeneratorBase

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

AdlerChecksum Members | DotZLib Namespace


AdlerChecksum Members

AdlerChecksum overview

Public Instance Constructors

AdlerChecksum Overloaded. Initializes a new instance of the AdlerChecksum class.

Public Instance Properties

Value (inherited from ChecksumGeneratorBase) Gets the current checksum value

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Reset (inherited from ChecksumGeneratorBase) | Resets the current checksum to zero
ToString (inherited from Object) | Returns a String that represents the current Object.
Update (inherited from ChecksumGeneratorBase) | Overloaded. Updates the current checksum with the data from a string, using a specific encoding
Update | Overloaded. Updates the current checksum with part of an array of bytes

Protected Instance Fields

_current (inherited from ChecksumGeneratorBase) The value of the current checksum

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

AdlerChecksum Class | DotZLib Namespace


AdlerChecksum Constructor

Initializes a new instance of the Adler checksum generator

Overload List

Initializes a new instance of the Adler checksum generator

public AdlerChecksum();

Initializes a new instance of the Adler checksum generator with a specified value

public AdlerChecksum(uint);

See Also

AdlerChecksum Class | DotZLib Namespace


AdlerChecksum Constructor ()

Initializes a new instance of the Adler checksum generator

public AdlerChecksum();

See Also

AdlerChecksum Class | DotZLib Namespace | AdlerChecksum Constructor Overload List


AdlerChecksum Constructor (UInt32)

Initializes a new instance of the Adler checksum generator with a specified value

public AdlerChecksum(
uint initialValue
);

Parameters

initialValue
The value to set the current checksum to

See Also

AdlerChecksum Class | DotZLib Namespace | AdlerChecksum Constructor Overload List


AdlerChecksum Methods

The methods of the AdlerChecksum class are listed below. For a complete list of AdlerChecksum class members, see the AdlerChecksum Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Reset (inherited from ChecksumGeneratorBase) | Resets the current checksum to zero
ToString (inherited from Object) | Returns a String that represents the current Object.
Update (inherited from ChecksumGeneratorBase) | Overloaded. Updates the current checksum with the data from a string, using a specific encoding
Update | Overloaded. Updates the current checksum with part of an array of bytes

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

AdlerChecksum Class | DotZLib Namespace


Update Method

DotZLib .Net wrapper for ZLib1.dll

AdlerChecksum.Update Method

Updates the current checksum with part of an array of bytes

Overload List

Inherited from ChecksumGeneratorBase.

public void Update(byte[]);

Updates the current checksum with part of an array of bytes

public override void Update(byte[],int,int);

Inherited from ChecksumGeneratorBase.

public void Update(string);

Inherited from ChecksumGeneratorBase.

public void Update(string,Encoding);

See Also

AdlerChecksum Class | DotZLib Namespace


AdlerChecksum.Update Method (Byte[], Int32, Int32)

Updates the current checksum with part of an array of bytes

public override void Update(
byte[] data,
int offset,
int count
);

Parameters

data
The data to update the checksum with
offset
Where in data to start updating
count
The number of bytes from data to use

Implements

ChecksumGenerator.Update

Exceptions

Exception Type | Condition
ArgumentException | The sum of offset and count is larger than the length of data
NullReferenceException | data is a null reference
ArgumentOutOfRangeException | Offset or count is negative.

See Also

AdlerChecksum Class | DotZLib Namespace | AdlerChecksum.Update Overload List


ChecksumGenerator Interface

Declares methods and properties that enables a running checksum to be calculated

For a list of all members of this type, see ChecksumGenerator Members.

public interface ChecksumGenerator

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

ChecksumGenerator Members | DotZLib Namespace


ChecksumGenerator Members

ChecksumGenerator overview

Public Instance Properties

Value Gets the current value of the checksum

Public Instance Methods

Reset | Clears the current checksum to 0
Update | Overloaded. Updates the current checksum with the data from a string, using a specific encoding

See Also

ChecksumGenerator Interface | DotZLib Namespace


ChecksumGenerator Properties

The properties of the ChecksumGenerator interface are listed below. For a complete list of ChecksumGenerator interface members, see the ChecksumGenerator Members topic.

Public Instance Properties

Value Gets the current value of the checksum

See Also

ChecksumGenerator Interface | DotZLib Namespace


ChecksumGenerator.Value Property

Gets the current value of the checksum

uint Value {get;}

See Also

ChecksumGenerator Interface | DotZLib Namespace


ChecksumGenerator Methods

The methods of the ChecksumGenerator interface are listed below. For a complete list of ChecksumGenerator interface members, see the ChecksumGenerator Members topic.

Public Instance Methods

Reset | Clears the current checksum to 0
Update | Overloaded. Updates the current checksum with the data from a string, using a specific encoding

See Also

ChecksumGenerator Interface | DotZLib Namespace


ChecksumGenerator.Reset Method

Clears the current checksum to 0

void Reset();

See Also

ChecksumGenerator Interface | DotZLib Namespace


Update Method

DotZLib .Net wrapper for ZLib1.dll

ChecksumGenerator.Update Method

Updates the current checksum with an array of bytes

Overload List

Updates the current checksum with an array of bytes

void Update(byte[]);

Updates the current checksum with part of an array of bytes

void Update(byte[],int,int);

Updates the current checksum with the data from a string

void Update(string);

Updates the current checksum with the data from a string, using a specific encoding

void Update(string,Encoding);

See Also

ChecksumGenerator Interface | DotZLib Namespace


ChecksumGenerator.Update Method (Byte[])

Updates the current checksum with an array of bytes

void Update(
byte[] data
);

Parameters

data
The data to update the checksum with

See Also

ChecksumGenerator Interface | DotZLib Namespace | ChecksumGenerator.Update Overload List


ChecksumGenerator.Update Method (Byte[], Int32, Int32)

Updates the current checksum with part of an array of bytes

void Update(
byte[] data,
int offset,
int count
);

Parameters

data
The data to update the checksum with
offset
Where in data to start updating
count
The number of bytes from data to use

Exceptions

Exception Type | Condition
ArgumentException | The sum of offset and count is larger than the length of data
ArgumentNullException | data is a null reference
ArgumentOutOfRangeException | Offset or count is negative.

See Also

ChecksumGenerator Interface | DotZLib Namespace | ChecksumGenerator.Update Overload List


ChecksumGenerator.Update Method (String)

Updates the current checksum with the data from a string

void Update(
string data
);

Parameters

data
The string to update the checksum with

Remarks

The characters in the string are converted by the UTF-8 encoding

See Also

ChecksumGenerator Interface | DotZLib Namespace | ChecksumGenerator.Update Overload List


ChecksumGenerator.Update Method (String, Encoding)

Updates the current checksum with the data from a string, using a specific encoding

void Update(
string data,
Encoding encoding
);

Parameters

data
The string to update the checksum with
encoding
The encoding to use

See Also

ChecksumGenerator Interface | DotZLib Namespace | ChecksumGenerator.Update Overload List


ChecksumGeneratorBase Class

Implements the common functionality needed for all ChecksumGenerators

For a list of all members of this type, see ChecksumGeneratorBase Members.

System.Object
ChecksumGeneratorBase

public abstract class ChecksumGeneratorBase : ChecksumGenerator

Example

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

ChecksumGeneratorBase Members | DotZLib Namespace


ChecksumGeneratorBase Members

ChecksumGeneratorBase overview

Public Instance Constructors

ChecksumGeneratorBase Overloaded. Initializes a new instance of the ChecksumGeneratorBase class.

Public Instance Properties

Value Gets the current checksum value

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Reset | Resets the current checksum to zero
ToString (inherited from Object) | Returns a String that represents the current Object.
Update | Overloaded. Updates the current checksum with the data from a string, using a specific encoding

Protected Instance Fields

_current The value of the current checksum

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ChecksumGeneratorBase Class | DotZLib Namespace


ChecksumGeneratorBase Constructor

Initializes a new instance of the checksum generator base - the current checksum is set to zero

Overload List

Initializes a new instance of the checksum generator base - the current checksum is set to zero

public ChecksumGeneratorBase();

Initializes a new instance of the checksum generator basewith a specified value

public ChecksumGeneratorBase(uint);

See Also

ChecksumGeneratorBase Class | DotZLib Namespace


ChecksumGeneratorBase Constructor ()

Initializes a new instance of the checksum generator base - the current checksum is set to zero

public ChecksumGeneratorBase();

See Also

ChecksumGeneratorBase Class | DotZLib Namespace | ChecksumGeneratorBase Constructor Overload List


ChecksumGeneratorBase Constructor (UInt32)

Initializes a new instance of the checksum generator basewith a specified value

public ChecksumGeneratorBase(
uint initialValue
);

Parameters

initialValue
The value to set the current checksum to

See Also

ChecksumGeneratorBase Class | DotZLib Namespace | ChecksumGeneratorBase Constructor Overload List


ChecksumGeneratorBase Fields

The fields of the ChecksumGeneratorBase class are listed below. For a complete list of ChecksumGeneratorBase class members, see the ChecksumGeneratorBase Members topic.

Protected Instance Fields

_current The value of the current checksum

See Also

ChecksumGeneratorBase Class | DotZLib Namespace


ChecksumGeneratorBase._current Field

The value of the current checksum

protected uint _current;

See Also

ChecksumGeneratorBase Class | DotZLib Namespace


ChecksumGeneratorBase Properties

The properties of the ChecksumGeneratorBase class are listed below. For a complete list of ChecksumGeneratorBase class members, see the ChecksumGeneratorBase Members topic.

Public Instance Properties

Value Gets the current checksum value

See Also

ChecksumGeneratorBase Class | DotZLib Namespace


ChecksumGeneratorBase.Value Property

Gets the current checksum value

public uint Value {get;}

Implements

ChecksumGenerator.Value

See Also

ChecksumGeneratorBase Class | DotZLib Namespace


ChecksumGeneratorBase Methods

The methods of the ChecksumGeneratorBase class are listed below. For a complete list of ChecksumGeneratorBase class members, see the ChecksumGeneratorBase Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Reset | Resets the current checksum to zero
ToString (inherited from Object) | Returns a String that represents the current Object.
Update | Overloaded. Updates the current checksum with the data from a string, using a specific encoding

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ChecksumGeneratorBase Class | DotZLib Namespace


ChecksumGeneratorBase.Reset Method

Resets the current checksum to zero

public void Reset();

Implements

ChecksumGenerator.Reset

See Also

ChecksumGeneratorBase Class | DotZLib Namespace


Update Method

DotZLib .Net wrapper for ZLib1.dll

ChecksumGeneratorBase.Update Method

Updates the current checksum with an array of bytes.

Overload List

Updates the current checksum with an array of bytes.

public void Update(byte[]);

Updates the current checksum with part of an array of bytes

public abstract void Update(byte[],int,int);

Updates the current checksum with the data from a string

public void Update(string);

Updates the current checksum with the data from a string, using a specific encoding

public void Update(string,Encoding);

See Also

ChecksumGeneratorBase Class | DotZLib Namespace


ChecksumGeneratorBase.Update Method (Byte[])

Updates the current checksum with an array of bytes.

public void Update(
byte[] data
);

Parameters

data
The data to update the checksum with

Implements

ChecksumGenerator.Update

See Also

ChecksumGeneratorBase Class | DotZLib Namespace | ChecksumGeneratorBase.Update Overload List


ChecksumGeneratorBase.Update Method (Byte[], Int32, Int32)

Updates the current checksum with part of an array of bytes

public abstract void Update(
byte[] data,
int offset,
int count
);

Parameters

data
The data to update the checksum with
offset
Where in data to start updating
count
The number of bytes from data to use

Implements

ChecksumGenerator.Update

Remarks

All the other Update methods are implmeneted in terms of this one. This is therefore the only method a derived class has to implement

Exceptions

Exception Type | Condition
ArgumentException | The sum of offset and count is larger than the length of data
NullReferenceException | data is a null reference
ArgumentOutOfRangeException | Offset or count is negative.

See Also

ChecksumGeneratorBase Class | DotZLib Namespace | ChecksumGeneratorBase.Update Overload List


ChecksumGeneratorBase.Update Method (String)

Updates the current checksum with the data from a string

public void Update(
string data
);

Parameters

data
The string to update the checksum with

Implements

ChecksumGenerator.Update

Remarks

The characters in the string are converted by the UTF-8 encoding

See Also

ChecksumGeneratorBase Class | DotZLib Namespace | ChecksumGeneratorBase.Update Overload List


ChecksumGeneratorBase.Update Method (String, Encoding)

Updates the current checksum with the data from a string, using a specific encoding

public void Update(
string data,
Encoding encoding
);

Parameters

data
The string to update the checksum with
encoding
The encoding to use

Implements

ChecksumGenerator.Update

See Also

ChecksumGeneratorBase Class | DotZLib Namespace | ChecksumGeneratorBase.Update Overload List


Codec Interface

Declares methods and events for implementing compressors/decompressors

For a list of all members of this type, see Codec Members.

public interface Codec

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

Codec Members | DotZLib Namespace


Codec Members

Codec overview

Public Instance Properties

Checksum Gets the checksum of the data that has been added so far

Public Instance Methods

Add | Overloaded. Adds more data to the codec to be processed.
Finish | Finishes up any pending data that needs to be processed and handled.

Public Instance Events

DataAvailable Occurs when more processed data are available.

See Also

Codec Interface | DotZLib Namespace


Codec Properties

The properties of the Codec interface are listed below. For a complete list of Codec interface members, see the Codec Members topic.

Public Instance Properties

Checksum Gets the checksum of the data that has been added so far

See Also

Codec Interface | DotZLib Namespace


Codec.Checksum Property

Gets the checksum of the data that has been added so far

uint Checksum {get;}

See Also

Codec Interface | DotZLib Namespace


Codec Methods

The methods of the Codec interface are listed below. For a complete list of Codec interface members, see the Codec Members topic.

Public Instance Methods

Add | Overloaded. Adds more data to the codec to be processed.
Finish | Finishes up any pending data that needs to be processed and handled.

See Also

Codec Interface | DotZLib Namespace


Add Method

DotZLib .Net wrapper for ZLib1.dll

Codec.Add Method

Adds more data to the codec to be processed.

Overload List

Adds more data to the codec to be processed.

void Add(byte[]);

Adds more data to the codec to be processed.

void Add(byte[],int,int);

See Also

Codec Interface | DotZLib Namespace


Codec.Add Method (Byte[])

Adds more data to the codec to be processed.

void Add(
byte[] data
);

Parameters

data
Byte array containing the data to be added to the codec

Remarks

Adding data may, or may not, raise the DataAvailable event

See Also

Codec Interface | DotZLib Namespace | Codec.Add Overload List


Codec.Add Method (Byte[], Int32, Int32)

Adds more data to the codec to be processed.

void Add(
byte[] data,
int offset,
int count
);

Parameters

data
Byte array containing the data to be added to the codec
offset
The index of the first byte to add from data
count
The number of bytes to add

Remarks

Adding data may, or may not, raise the DataAvailable event

See Also

Codec Interface | DotZLib Namespace | Codec.Add Overload List


Codec.Finish Method

Finishes up any pending data that needs to be processed and handled.

void Finish();

See Also

Codec Interface | DotZLib Namespace


Codec Events

The events of the Codec interface are listed below. For a complete list of Codec interface members, see the Codec Members topic.

Public Instance Events

DataAvailable Occurs when more processed data are available.

See Also

Codec Interface | DotZLib Namespace


Codec.DataAvailable Event

Occurs when more processed data are available.

event DataAvailableHandler DataAvailable;

See Also

Codec Interface | DotZLib Namespace


CodecBase Class

Implements the common functionality needed for all Codecs

For a list of all members of this type, see CodecBase Members.

System.Object
CodecBase

public abstract class CodecBase : Codec, IDisposable

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

CodecBase Members | DotZLib Namespace


CodecBase Members

CodecBase overview

Protected Static Fields

kBufferSize The size of the internal buffers

Public Instance Constructors

CodecBase Constructor Initializes a new instance of the CodeBase class.

Public Instance Properties

Checksum Gets the checksum of the data that has been added so far

Public Instance Methods

Add | Overloaded. Adds more data to the codec to be processed.
Dispose | Releases any unmanaged resources and calls the CleanUp method of the derived class
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
Finish | Finishes up any pending data that needs to be processed and handled.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

DataAvailable Occurs when more processed data are available.

Protected Instance Fields

_isDisposed True if the object instance has been disposed, false otherwise

Protected Instance Methods

CleanUp | Performs any codec specific cleanup
copyInput | Copies a number of bytes to the internal codec buffer - ready for proccesing
Finalize | Destroys this instance
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
OnDataAvailable | Fires the DataAvailable event
resetOutput | Resets the internal output buffers to a known state - ready for processing
setChecksum | Updates the running checksum property

See Also

CodecBase Class | DotZLib Namespace


CodecBase Constructor

Initializes a new instance of the CodeBase class.

public CodecBase();

See Also

CodecBase Class | DotZLib Namespace


CodecBase Fields

The fields of the CodecBase class are listed below. For a complete list of CodecBase class members, see the CodecBase Members topic.

Protected Static Fields

kBufferSize The size of the internal buffers

Protected Instance Fields

_isDisposed True if the object instance has been disposed, false otherwise

See Also

CodecBase Class | DotZLib Namespace


CodecBase._isDisposed Field

True if the object instance has been disposed, false otherwise

protected bool _isDisposed;

See Also

CodecBase Class | DotZLib Namespace


CodecBase.kBufferSize Field

The size of the internal buffers

protected const int kBufferSize;

See Also

CodecBase Class | DotZLib Namespace


CodecBase Properties

The properties of the CodecBase class are listed below. For a complete list of CodecBase class members, see the CodecBase Members topic.

Public Instance Properties

Checksum Gets the checksum of the data that has been added so far

See Also

CodecBase Class | DotZLib Namespace


CodecBase.Checksum Property

Gets the checksum of the data that has been added so far

public uint Checksum {get;}

Implements

Codec.Checksum

See Also

CodecBase Class | DotZLib Namespace


CodecBase Methods

The methods of the CodecBase class are listed below. For a complete list of CodecBase class members, see the CodecBase Members topic.

Public Instance Methods

Add | Overloaded. Adds more data to the codec to be processed.
Dispose | Releases any unmanaged resources and calls the CleanUp method of the derived class
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
Finish | Finishes up any pending data that needs to be processed and handled.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

CleanUp | Performs any codec specific cleanup
copyInput | Copies a number of bytes to the internal codec buffer - ready for proccesing
Finalize | Destroys this instance
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
OnDataAvailable | Fires the DataAvailable event
resetOutput | Resets the internal output buffers to a known state - ready for processing
setChecksum | Updates the running checksum property

See Also

CodecBase Class | DotZLib Namespace


Add Method

DotZLib .Net wrapper for ZLib1.dll

CodecBase.Add Method

Adds more data to the codec to be processed.

Overload List

Adds more data to the codec to be processed.

public void Add(byte[]);

Adds more data to the codec to be processed.

public abstract void Add(byte[],int,int);

See Also

CodecBase Class | DotZLib Namespace


CodecBase.Add Method (Byte[])

Adds more data to the codec to be processed.

public void Add(
byte[] data
);

Parameters

data
Byte array containing the data to be added to the codec

Implements

Codec.Add

Remarks

Adding data may, or may not, raise the DataAvailable event

See Also

CodecBase Class | DotZLib Namespace | CodecBase.Add Overload List


CodecBase.Add Method (Byte[], Int32, Int32)

Adds more data to the codec to be processed.

public abstract void Add(
byte[] data,
int offset,
int count
);

Parameters

data
Byte array containing the data to be added to the codec
offset
The index of the first byte to add from data
count
The number of bytes to add

Implements

Codec.Add

Remarks

Adding data may, or may not, raise the DataAvailable eventThis must be implemented by a derived class

See Also

CodecBase Class | DotZLib Namespace | CodecBase.Add Overload List


CodecBase.CleanUp Method

Performs any codec specific cleanup

protected abstract void CleanUp();

Remarks

This must be implemented by a derived class

See Also

CodecBase Class | DotZLib Namespace


CodecBase.copyInput Method

Copies a number of bytes to the internal codec buffer - ready for proccesing

protected void copyInput(
byte[] data,
int startIndex,
int count
);

Parameters

data
The byte array that contains the data to copy
startIndex
The index of the first byte to copy
count
The number of bytes to copy from data

See Also

CodecBase Class | DotZLib Namespace


CodecBase.Dispose Method

Releases any unmanaged resources and calls the CleanUp method of the derived class

public void Dispose();

Implements

IDisposable.Dispose

See Also

CodecBase Class | DotZLib Namespace


CodecBase.Finalize Method

Destroys this instance

protected override void Finalize();

See Also

CodecBase Class | DotZLib Namespace


CodecBase.Finish Method

Finishes up any pending data that needs to be processed and handled.

public abstract void Finish();

Implements

Codec.Finish

Remarks

This must be implemented by a derived class

See Also

CodecBase Class | DotZLib Namespace


CodecBase.OnDataAvailable Method

Fires the DataAvailable event

protected void OnDataAvailable();

See Also

CodecBase Class | DotZLib Namespace


CodecBase.resetOutput Method

Resets the internal output buffers to a known state - ready for processing

protected void resetOutput();

See Also

CodecBase Class | DotZLib Namespace


CodecBase.setChecksum Method

Updates the running checksum property

protected void setChecksum(
uint newSum
);

Parameters

newSum
The new checksum value

See Also

CodecBase Class | DotZLib Namespace


CodecBase Events

The events of the CodecBase class are listed below. For a complete list of CodecBase class members, see the CodecBase Members topic.

Public Instance Events

DataAvailable Occurs when more processed data are available.

See Also

CodecBase Class | DotZLib Namespace


CodecBase.DataAvailable Event

Occurs when more processed data are available.

public event DataAvailableHandler DataAvailable;

Implements

Codec.DataAvailable

See Also

CodecBase Class | DotZLib Namespace


CompressLevel Enumeration

Defines constants for the available compression levels in zlib

public enum CompressLevel

Members

Member Name | Description
Default | The default compression level with a reasonable compromise between compression and speed
None | No compression at all. The data are passed straight through.
Best | The maximum compression rate available.
Fastest | The fastest available compression level.

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

DotZLib Namespace


CRC32Checksum Class

Implements a CRC32 checksum generator

For a list of all members of this type, see CRC32Checksum Members.

System.Object
ChecksumGeneratorBase
CRC32Checksum

public sealed class CRC32Checksum : ChecksumGeneratorBase

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

CRC32Checksum Members | DotZLib Namespace


CRC32Checksum Members

CRC32Checksum overview

Public Instance Constructors

CRC32Checksum Overloaded. Initializes a new instance of the CRC32Checksum class.

Public Instance Properties

Value (inherited from ChecksumGeneratorBase) Gets the current checksum value

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Reset (inherited from ChecksumGeneratorBase) | Resets the current checksum to zero
ToString (inherited from Object) | Returns a String that represents the current Object.
Update (inherited from ChecksumGeneratorBase) | Overloaded. Updates the current checksum with the data from a string, using a specific encoding
Update | Overloaded. Updates the current checksum with part of an array of bytes

Protected Instance Fields

_current (inherited from ChecksumGeneratorBase) The value of the current checksum

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

CRC32Checksum Class | DotZLib Namespace


CRC32Checksum Constructor

Initializes a new instance of the CRC32 checksum generator

Overload List

Initializes a new instance of the CRC32 checksum generator

public CRC32Checksum();

Initializes a new instance of the CRC32 checksum generator with a specified value

public CRC32Checksum(uint);

See Also

CRC32Checksum Class | DotZLib Namespace


CRC32Checksum Constructor ()

Initializes a new instance of the CRC32 checksum generator

public CRC32Checksum();

See Also

CRC32Checksum Class | DotZLib Namespace | CRC32Checksum Constructor Overload List


CRC32Checksum Constructor (UInt32)

Initializes a new instance of the CRC32 checksum generator with a specified value

public CRC32Checksum(
uint initialValue
);

Parameters

initialValue
The value to set the current checksum to

See Also

CRC32Checksum Class | DotZLib Namespace | CRC32Checksum Constructor Overload List


CRC32Checksum Methods

The methods of the CRC32Checksum class are listed below. For a complete list of CRC32Checksum class members, see the CRC32Checksum Members topic.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
Reset (inherited from ChecksumGeneratorBase) | Resets the current checksum to zero
ToString (inherited from Object) | Returns a String that represents the current Object.
Update (inherited from ChecksumGeneratorBase) | Overloaded. Updates the current checksum with the data from a string, using a specific encoding
Update | Overloaded. Updates the current checksum with part of an array of bytes

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

CRC32Checksum Class | DotZLib Namespace


Update Method

DotZLib .Net wrapper for ZLib1.dll

CRC32Checksum.Update Method

Updates the current checksum with part of an array of bytes

Overload List

Inherited from ChecksumGeneratorBase.

public void Update(byte[]);

Updates the current checksum with part of an array of bytes

public override void Update(byte[],int,int);

Inherited from ChecksumGeneratorBase.

public void Update(string);

Inherited from ChecksumGeneratorBase.

public void Update(string,Encoding);

See Also

CRC32Checksum Class | DotZLib Namespace


CRC32Checksum.Update Method (Byte[], Int32, Int32)

Updates the current checksum with part of an array of bytes

public override void Update(
byte[] data,
int offset,
int count
);

Parameters

data
The data to update the checksum with
offset
Where in data to start updating
count
The number of bytes from data to use

Implements

ChecksumGenerator.Update

Exceptions

Exception Type | Condition
ArgumentException | The sum of offset and count is larger than the length of data
NullReferenceException | data is a null reference
ArgumentOutOfRangeException | Offset or count is negative.

See Also

CRC32Checksum Class | DotZLib Namespace | CRC32Checksum.Update Overload List


DataAvailableHandler Delegate

Represents the method that will be called from a codec when new data are available.

public delegate void DataAvailableHandler(
byte[] data,
int startIndex,
int count
);

Remarks

On return from this method, the data may be overwritten, so grab it while you can. You cannot assume that startIndex will be zero.

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

DotZLib Namespace


Deflater Class

Implements a data compressor, using the deflate algorithm in the ZLib dll

For a list of all members of this type, see Deflater Members.

System.Object
CodecBase
Deflater

public sealed class Deflater : CodecBase

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

Deflater Members | DotZLib Namespace


Deflater Members

Deflater overview

Public Instance Constructors

Deflater Constructor Constructs an new instance of the Deflater

Public Instance Properties

Checksum (inherited from CodecBase) Gets the checksum of the data that has been added so far

Public Instance Methods

Add | Overloaded. Adds more data to the codec to be processed.
Add (inherited from CodecBase) | Overloaded. Adds more data to the codec to be processed.
Dispose (inherited from CodecBase) | Releases any unmanaged resources and calls the CleanUp method of the derived class
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
Finish | Finishes up any pending data that needs to be processed and handled.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

DataAvailable (inherited from CodecBase) Occurs when more processed data are available.

Protected Instance Fields

_isDisposed (inherited from CodecBase) True if the object instance has been disposed, false otherwise

Protected Instance Methods

CleanUp | Closes the internal zlib deflate stream
copyInput (inherited from CodecBase) | Copies a number of bytes to the internal codec buffer - ready for proccesing
Finalize (inherited from CodecBase) | Destroys this instance
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
OnDataAvailable (inherited from CodecBase) | Fires the DataAvailable event
resetOutput (inherited from CodecBase) | Resets the internal output buffers to a known state - ready for processing
setChecksum (inherited from CodecBase) | Updates the running checksum property

See Also

Deflater Class | DotZLib Namespace


Deflater Constructor

Constructs an new instance of the Deflater

public Deflater(
CompressLevel level
);

Parameters

level
The compression level to use for this Deflater

See Also

Deflater Class | DotZLib Namespace


Deflater Methods

The methods of the Deflater class are listed below. For a complete list of Deflater class members, see the Deflater Members topic.

Public Instance Methods

Add | Overloaded. Adds more data to the codec to be processed.
Add (inherited from CodecBase) | Overloaded. Adds more data to the codec to be processed.
Dispose (inherited from CodecBase) | Releases any unmanaged resources and calls the CleanUp method of the derived class
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
Finish | Finishes up any pending data that needs to be processed and handled.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

CleanUp | Closes the internal zlib deflate stream
copyInput (inherited from CodecBase) | Copies a number of bytes to the internal codec buffer - ready for proccesing
Finalize (inherited from CodecBase) | Destroys this instance
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
OnDataAvailable (inherited from CodecBase) | Fires the DataAvailable event
resetOutput (inherited from CodecBase) | Resets the internal output buffers to a known state - ready for processing
setChecksum (inherited from CodecBase) | Updates the running checksum property

See Also

Deflater Class | DotZLib Namespace


Add Method

DotZLib .Net wrapper for ZLib1.dll

Deflater.Add Method

Adds more data to the codec to be processed.

Overload List

Inherited from CodecBase.

public void Add(byte[]);

Adds more data to the codec to be processed.

public override void Add(byte[],int,int);

See Also

Deflater Class | DotZLib Namespace


Deflater.Add Method (Byte[], Int32, Int32)

Adds more data to the codec to be processed.

public override void Add(
byte[] data,
int offset,
int count
);

Parameters

data
Byte array containing the data to be added to the codec
offset
The index of the first byte to add from data
count
The number of bytes to add

Implements

Codec.Add

Remarks

Adding data may, or may not, raise the DataAvailable event

See Also

Deflater Class | DotZLib Namespace | Deflater.Add Overload List


Deflater.CleanUp Method

Closes the internal zlib deflate stream

protected override void CleanUp();

See Also

Deflater Class | DotZLib Namespace


Deflater.Finish Method

Finishes up any pending data that needs to be processed and handled.

public override void Finish();

Implements

Codec.Finish

See Also

Deflater Class | DotZLib Namespace


GZipStream Class

Implements a compressed Stream, in GZip (.gz) format.

For a list of all members of this type, see GZipStream Members.

System.Object
MarshalByRefObject
Stream
GZipStream

public class GZipStream : Stream

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

GZipStream Members | DotZLib Namespace


GZipStream Members

GZipStream overview

Public Instance Constructors

GZipStream Overloaded. Initializes a new instance of the GZipStream class.

Public Instance Properties

CanRead | Returns true of this stream can be read from, false otherwise
CanSeek | Returns false.
CanWrite | Returns true if this tsream is writeable, false otherwise
Length | Gets the size of the stream. Not suppported.
Position | Gets/sets the current position in the GZipStream. Not suppported.

Public Instance Methods

BeginRead (inherited from Stream) | Begins an asynchronous read operation.
BeginWrite (inherited from Stream) | Begins an asynchronous write operation.
Close (inherited from Stream) | Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
CreateObjRef (inherited from MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Dispose | Closes the external file handle
EndRead (inherited from Stream) | Waits for the pending asynchronous read to complete.
EndWrite (inherited from Stream) | Ends an asynchronous write operation.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
Flush | Flushes the GZipStream.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetLifetimeService (inherited from MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
GetType (inherited from Object) | Gets the Type of the current instance.
InitializeLifetimeService (inherited from MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Read | Attempts to read a number of bytes from the stream.
ReadByte | Attempts to read a single byte from the stream.
Seek | Not suppported.
SetLength | Not supported.
ToString (inherited from Object) | Returns a String that represents the current Object.
Write | Writes a number of bytes to the stream
WriteByte | Writes a single byte to the stream

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Allocates a WaitHandle object.
Finalize | Destroys this instance
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream)

See Also

GZipStream Class | DotZLib Namespace


GZipStream Constructor

Creates a new file as a writeable GZipStream

Overload List

Opens an existing file as a readable GZipStream

public GZipStream(string);

Creates a new file as a writeable GZipStream

public GZipStream(string,CompressLevel);

See Also

GZipStream Class | DotZLib Namespace


GZipStream Constructor (String, CompressLevel)

Creates a new file as a writeable GZipStream

public GZipStream(
string fileName,
CompressLevel level
);

Parameters

fileName
The name of the compressed file to create
level
The compression level to use when adding data

Exceptions

Exception Type | Condition
ZLibException | If an error occurred in the internal zlib function

See Also

GZipStream Class | DotZLib Namespace | GZipStream Constructor Overload List


GZipStream Constructor (String)

Opens an existing file as a readable GZipStream

public GZipStream(
string fileName
);

Parameters

fileName
The name of the file to open

Exceptions

Exception Type | Condition
ZLibException | If an error occurred in the internal zlib function

See Also

GZipStream Class | DotZLib Namespace | GZipStream Constructor Overload List


GZipStream Properties

The properties of the GZipStream class are listed below. For a complete list of GZipStream class members, see the GZipStream Members topic.

Public Instance Properties

CanRead | Returns true of this stream can be read from, false otherwise
CanSeek | Returns false.
CanWrite | Returns true if this tsream is writeable, false otherwise
Length | Gets the size of the stream. Not suppported.
Position | Gets/sets the current position in the GZipStream. Not suppported.

See Also

GZipStream Class | DotZLib Namespace


GZipStream.CanRead Property

Returns true of this stream can be read from, false otherwise

public override bool CanRead {get;}

See Also

GZipStream Class | DotZLib Namespace


GZipStream.CanSeek Property

Returns false.

public override bool CanSeek {get;}

See Also

GZipStream Class | DotZLib Namespace


GZipStream.CanWrite Property

Returns true if this tsream is writeable, false otherwise

public override bool CanWrite {get;}

See Also

GZipStream Class | DotZLib Namespace


GZipStream.Length Property

Gets the size of the stream. Not suppported.

public override long Length {get;}

Remarks

In this implementation this property is not supported

Exceptions

Exception Type | Condition
NotSupportedException | Always thrown

See Also

GZipStream Class | DotZLib Namespace


GZipStream.Position Property

Gets/sets the current position in the GZipStream. Not suppported.

public override long Position {get; set;}

Remarks

In this implementation this property is not supported

Exceptions

Exception Type | Condition
NotSupportedException | Always thrown

See Also

GZipStream Class | DotZLib Namespace


GZipStream Methods

The methods of the GZipStream class are listed below. For a complete list of GZipStream class members, see the GZipStream Members topic.

Public Instance Methods

BeginRead (inherited from Stream) | Begins an asynchronous read operation.
BeginWrite (inherited from Stream) | Begins an asynchronous write operation.
Close (inherited from Stream) | Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
CreateObjRef (inherited from MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Dispose | Closes the external file handle
EndRead (inherited from Stream) | Waits for the pending asynchronous read to complete.
EndWrite (inherited from Stream) | Ends an asynchronous write operation.
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
Flush | Flushes the GZipStream.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetLifetimeService (inherited from MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
GetType (inherited from Object) | Gets the Type of the current instance.
InitializeLifetimeService (inherited from MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Read | Attempts to read a number of bytes from the stream.
ReadByte | Attempts to read a single byte from the stream.
Seek | Not suppported.
SetLength | Not supported.
ToString (inherited from Object) | Returns a String that represents the current Object.
Write | Writes a number of bytes to the stream
WriteByte | Writes a single byte to the stream

Protected Instance Methods

CreateWaitHandle (inherited from Stream) | Allocates a WaitHandle object.
Finalize | Destroys this instance
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

Explicit Interface Implementations

IDisposable.Dispose (inherited from Stream)

See Also

GZipStream Class | DotZLib Namespace


GZipStream.Dispose Method

Closes the external file handle

public void Dispose();

Implements

IDisposable.Dispose

See Also

GZipStream Class | DotZLib Namespace


GZipStream.Finalize Method

Destroys this instance

protected override void Finalize();

See Also

GZipStream Class | DotZLib Namespace


GZipStream.Flush Method

Flushes the GZipStream.

public override void Flush();

Remarks

In this implementation, this method does nothing. This is because excessive flushing may degrade the achievable compression rates.

See Also

GZipStream Class | DotZLib Namespace


GZipStream.Read Method

Attempts to read a number of bytes from the stream.

public override int Read(
byte[] buffer,
int offset,
int count
);

Parameters

buffer
The destination data buffer
offset
The index of the first destination byte in buffer
count
The number of bytes requested

Return Value

The number of bytes read

Exceptions

Exception Type | Condition
ArgumentNullException | If buffer is null
ArgumentOutOfRangeException | If count or offset are negative
ArgumentException | If offset + count is > buffer.Length
NotSupportedException | If this stream is not readable.
ObjectDisposedException | If this stream has been disposed.

See Also

GZipStream Class | DotZLib Namespace


GZipStream.ReadByte Method

Attempts to read a single byte from the stream.

public override int ReadByte();

Return Value

The byte that was read, or -1 in case of error or End-Of-File

See Also

GZipStream Class | DotZLib Namespace


GZipStream.Seek Method

Not suppported.

public override long Seek(
long offset,
SeekOrigin origin
);

Parameters

offset
origin

Return Value

Exceptions

Exception Type | Condition
NotSupportedException | Always thrown

See Also

GZipStream Class | DotZLib Namespace


GZipStream.SetLength Method

Not supported.

public override void SetLength(
long value
);

Parameters

value

Exceptions

Exception Type | Condition
NotSupportedException | Always thrown

See Also

GZipStream Class | DotZLib Namespace


GZipStream.Write Method

Writes a number of bytes to the stream

public override void Write(
byte[] buffer,
int offset,
int count
);

Parameters

buffer
offset
count

Exceptions

Exception Type | Condition
ArgumentNullException | If buffer is null
ArgumentOutOfRangeException | If count or offset are negative
ArgumentException | If offset + count is > buffer.Length
NotSupportedException | If this stream is not writeable.
ObjectDisposedException | If this stream has been disposed.

See Also

GZipStream Class | DotZLib Namespace


GZipStream.WriteByte Method

Writes a single byte to the stream

public override void WriteByte(
byte value
);

Parameters

value
The byte to add to the stream.

Exceptions

Exception Type | Condition
NotSupportedException | If this stream is not writeable.
ObjectDisposedException | If this stream has been disposed.

See Also

GZipStream Class | DotZLib Namespace


Inflater Class

Implements a data decompressor, using the inflate algorithm in the ZLib dll

For a list of all members of this type, see Inflater Members.

System.Object
CodecBase
Inflater

public class Inflater : CodecBase

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

Inflater Members | DotZLib Namespace


Inflater Members

Inflater overview

Public Instance Constructors

Inflater Constructor Constructs an new instance of the Inflater

Public Instance Properties

Checksum (inherited from CodecBase) Gets the checksum of the data that has been added so far

Public Instance Methods

Add | Overloaded. Adds more data to the codec to be processed.
Add (inherited from CodecBase) | Overloaded. Adds more data to the codec to be processed.
Dispose (inherited from CodecBase) | Releases any unmanaged resources and calls the CleanUp method of the derived class
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
Finish | Finishes up any pending data that needs to be processed and handled.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Public Instance Events

DataAvailable (inherited from CodecBase) Occurs when more processed data are available.

Protected Instance Fields

_isDisposed (inherited from CodecBase) True if the object instance has been disposed, false otherwise

Protected Instance Methods

CleanUp | Closes the internal zlib inflate stream
copyInput (inherited from CodecBase) | Copies a number of bytes to the internal codec buffer - ready for proccesing
Finalize (inherited from CodecBase) | Destroys this instance
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
OnDataAvailable (inherited from CodecBase) | Fires the DataAvailable event
resetOutput (inherited from CodecBase) | Resets the internal output buffers to a known state - ready for processing
setChecksum (inherited from CodecBase) | Updates the running checksum property

See Also

Inflater Class | DotZLib Namespace


Inflater Constructor

Constructs an new instance of the Inflater

public Inflater();

See Also

Inflater Class | DotZLib Namespace


Inflater Methods

The methods of the Inflater class are listed below. For a complete list of Inflater class members, see the Inflater Members topic.

Public Instance Methods

Add | Overloaded. Adds more data to the codec to be processed.
Add (inherited from CodecBase) | Overloaded. Adds more data to the codec to be processed.
Dispose (inherited from CodecBase) | Releases any unmanaged resources and calls the CleanUp method of the derived class
Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
Finish | Finishes up any pending data that needs to be processed and handled.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

CleanUp | Closes the internal zlib inflate stream
copyInput (inherited from CodecBase) | Copies a number of bytes to the internal codec buffer - ready for proccesing
Finalize (inherited from CodecBase) | Destroys this instance
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.
OnDataAvailable (inherited from CodecBase) | Fires the DataAvailable event
resetOutput (inherited from CodecBase) | Resets the internal output buffers to a known state - ready for processing
setChecksum (inherited from CodecBase) | Updates the running checksum property

See Also

Inflater Class | DotZLib Namespace


Add Method

DotZLib .Net wrapper for ZLib1.dll

Inflater.Add Method

Adds more data to the codec to be processed.

Overload List

Inherited from CodecBase.

public void Add(byte[]);

Adds more data to the codec to be processed.

public override void Add(byte[],int,int);

See Also

Inflater Class | DotZLib Namespace


Inflater.Add Method (Byte[], Int32, Int32)

Adds more data to the codec to be processed.

public override void Add(
byte[] data,
int offset,
int count
);

Parameters

data
Byte array containing the data to be added to the codec
offset
The index of the first byte to add from data
count
The number of bytes to add

Implements

Codec.Add

Remarks

Adding data may, or may not, raise the DataAvailable event

See Also

Inflater Class | DotZLib Namespace | Inflater.Add Overload List


Inflater.CleanUp Method

Closes the internal zlib inflate stream

protected override void CleanUp();

See Also

Inflater Class | DotZLib Namespace


Inflater.Finish Method

Finishes up any pending data that needs to be processed and handled.

public override void Finish();

Implements

Codec.Finish

See Also

Inflater Class | DotZLib Namespace


Info Class

Encapsulates general information about the ZLib library

For a list of all members of this type, see Info Members.

System.Object
Info

public class Info

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

Info Members | DotZLib Namespace


Info Members

Info overview

Public Static Properties

Version Gets the version of ZLib as a string, e.g. "1.2.1"

Public Instance Constructors

Info Constructor Constructs an instance of the Info class.

Public Instance Properties

HasDebugInfo | True if the library is compiled with debug info
SizeOfOffset | Gets the size of the z_off_t type that was compiled into Zlib
SizeOfPointer | Gets the size of the pointers that were compiled into Zlib
SizeOfUInt | Gets the size of the unsigned int that was compiled into Zlib
SizeOfULong | Gets the size of the unsigned long that was compiled into Zlib
UsesAssemblyCode | True if the library is compiled with assembly optimizations

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Object) | Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

Info Class | DotZLib Namespace


Info Constructor

Constructs an instance of the Info class.

public Info();

See Also

Info Class | DotZLib Namespace


Info Properties

The properties of the Info class are listed below. For a complete list of Info class members, see the Info Members topic.

Public Static Properties

Version Gets the version of ZLib as a string, e.g. "1.2.1"

Public Instance Properties

HasDebugInfo | True if the library is compiled with debug info
SizeOfOffset | Gets the size of the z_off_t type that was compiled into Zlib
SizeOfPointer | Gets the size of the pointers that were compiled into Zlib
SizeOfUInt | Gets the size of the unsigned int that was compiled into Zlib
SizeOfULong | Gets the size of the unsigned long that was compiled into Zlib
UsesAssemblyCode | True if the library is compiled with assembly optimizations

See Also

Info Class | DotZLib Namespace


Info.HasDebugInfo Property

True if the library is compiled with debug info

public bool HasDebugInfo {get;}

See Also

Info Class | DotZLib Namespace


Info.SizeOfOffset Property

Gets the size of the z_off_t type that was compiled into Zlib

public int SizeOfOffset {get;}

See Also

Info Class | DotZLib Namespace


Info.SizeOfPointer Property

Gets the size of the pointers that were compiled into Zlib

public int SizeOfPointer {get;}

See Also

Info Class | DotZLib Namespace


Info.SizeOfUInt Property

Gets the size of the unsigned int that was compiled into Zlib

public int SizeOfUInt {get;}

See Also

Info Class | DotZLib Namespace


Info.SizeOfULong Property

Gets the size of the unsigned long that was compiled into Zlib

public int SizeOfULong {get;}

See Also

Info Class | DotZLib Namespace


Info.UsesAssemblyCode Property

True if the library is compiled with assembly optimizations

public bool UsesAssemblyCode {get;}

See Also

Info Class | DotZLib Namespace


Info.Version Property

Gets the version of ZLib as a string, e.g. "1.2.1"

public static string Version {get;}

See Also

Info Class | DotZLib Namespace


ZLibException Class

The exception that is thrown when an error occurs on the zlib dll

For a list of all members of this type, see ZLibException Members.

System.Object
Exception
ApplicationException
ZLibException

public class ZLibException : ApplicationException

Requirements

Namespace: DotZLib

Assembly: DotZLib (in DotZLib.dll)

See Also

ZLibException Members | DotZLib Namespace


ZLibException Members

ZLibException overview

Public Instance Constructors

ZLibException Overloaded. Initializes a new instance of the ZLibException class.

Public Instance Properties

HelpLink (inherited from Exception) | Gets or sets a link to the help file associated with this exception.
InnerException (inherited from Exception) | Gets the Exception instance that caused the current exception.
Message (inherited from Exception) | Gets a message that describes the current exception.
Source (inherited from Exception) | Gets or sets the name of the application or the object that causes the error.
StackTrace (inherited from Exception) | Gets a string representation of the frames on the call stack at the time the current exception was thrown.
TargetSite (inherited from Exception) | Gets the method that throws the current exception.

Public Instance Methods

Equals (inherited from Object) | Determines whether the specified Object is equal to the current Object.
GetBaseException (inherited from Exception) | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
GetHashCode (inherited from Object) | Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetObjectData (inherited from Exception) | When overridden in a derived class, sets the SerializationInfo with information about the exception.
GetType (inherited from Object) | Gets the Type of the current instance.
ToString (inherited from Exception) | Creates and returns a string representation of the current exception.

Protected Instance Properties

HResult (inherited from Exception) Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.

Protected Instance Methods

Finalize (inherited from Object) | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) | Creates a shallow copy of the current Object.

See Also

ZLibException Class | DotZLib Namespace


ZLibException Constructor

Initializes a new instance of the ZLibException class with a specified error message and error code

Overload List

Initializes a new instance of the ZLibException class with a specified error code

public ZLibException(int);

Initializes a new instance of the ZLibException class with a specified error message and error code

public ZLibException(int,string);

See Also

ZLibException Class | DotZLib Namespace


ZLibException Constructor (Int32, String)

Initializes a new instance of the ZLibException class with a specified error message and error code

public ZLibException(
int errorCode,
string msg
);

Parameters

errorCode
The zlib error code that caused the exception
msg
A message that (hopefully) describes the error

See Also

ZLibException Class | DotZLib Namespace | ZLibException Constructor Overload List


ZLibException Constructor (Int32)

Initializes a new instance of the ZLibException class with a specified error code

public ZLibException(
int errorCode
);

Parameters

errorCode
The zlib error code that caused the exception

See Also

ZLibException Class | DotZLib Namespace | ZLibException Constructor Overload List