/// <summary> /// Constructs an new instance of the <c>Inflater</c> /// </summary> public Inflater() : base()
{ int retval = inflateInit_(ref _ztream, Info.Version, Marshal.SizeOf(_ztream)); if (retval != 0) thrownew ZLibException(retval, "Could not initialize inflater");
resetOutput();
}
/// <summary> /// Adds more data to the codec to be processed. /// </summary> /// <param name="data">Byte array containing the data to be added to the codec</param> /// <param name="offset">The index of the first byte to add from <c>data</c></param> /// <param name="count">The number of bytes to add</param> /// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks> publicoverridevoidAdd(byte[] data, int offset, int count)
{ if (data == null) thrownew ArgumentNullException(); if (offset < 0 || count < 0) thrownew ArgumentOutOfRangeException(); if ((offset+count) > data.Length) thrownew ArgumentException();
int total = count; int inputIndex = offset; int err = 0;
/// <summary> /// Finishes up any pending data that needs to be processed and handled. /// </summary> publicoverridevoid Finish()
{ int err; do
{
err = inflate(ref _ztream, (int)FlushTypes.Finish);
OnDataAvailable();
} while (err == 0);
setChecksum( _ztream.adler );
inflateReset(ref _ztream);
resetOutput();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.