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

SharpZip Compression Library

SharpZip Compression Library

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

Sets the preset dictionary. This should only be called, if needsDictionary() returns true and it should set the same dictionary, that was used for deflating. The getAdler() function returns the checksum of the dictionary needed.

public void SetDictionary(
   byte[] buffer,
   int offset,
   int len
);

Parameters

buffer
The dictionary.
offset
The offset into buffer where the dictionary starts.
len
The length of the dictionary.

Exceptions

Exception Type Condition
InvalidOperationException No dictionary is needed.
SharpZipBaseException The adler checksum for the buffer is invalid

See Also

Inflater Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace | Inflater.SetDictionary Overload List