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

IC Sharp Sharp Zip Lib

ICSharpCode SharpZipLib Class Library

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

Sets the dictionary which should be used in the deflate process. The dictionary is a byte array containing strings that are likely to occur in the data which should be compressed. The dictionary is not stored in the compressed output, only a checksum. To decompress the output you need to supply the same dictionary again.

public void SetDictionary(
   byte[] dictionary,
   int index,
   int count
);

Parameters

dictionary
The dictionary data
index
The index where dictionary information commences.
count
The number of bytes in the dictionary.

Exceptions

Exception Type Condition
InvalidOperationException If SetInput () or Deflate() were already called or another dictionary was already set.

See Also

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