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

DeflateOverloaded. Deflates the current input block to the given array. It returns the number of bytes compressed, or 0 if either needsInput() or finished() returns true or length is zero.
Equals (inherited from Object)Select the method name to go to the Microsoft documentation.
Finish Finishes the deflater with the current input block. It is an error to give more input after this method was called. This method must be called to force all bytes to be flushed.
Flush Flushes the current input block. Further calls to deflate() will produce enough output to inflate everything in the current input block. This is not part of Sun's JDK so I have made it package private. It is used by DeflaterOutputStream to implement flush().
GetHashCode (inherited from Object)Select the method name to go to the Microsoft documentation.
GetType (inherited from Object)Select the method name to go to the Microsoft documentation.
Reset Resets the deflater. The deflater acts afterwards as if it was just created with the same compression level and strategy as it had before.
SetDictionaryOverloaded. Sets the dictionary which should be used in the deflate process. This call is equivalent to
setDictionary(dict, 0, dict.Length)
.
SetInputOverloaded. Sets the data which should be compressed next. This should be only called when needsInput indicates that more input is needed. If you call setInput when needsInput() returns false, the previous input that is still pending will be thrown away. The given byte array should not be changed, before needsInput() returns true again. This call is equivalent to
setInput(input, 0, input.length)
.
SetLevel Sets the compression level. There is no guarantee of the exact position of the change, but if you call this when needsInput is true the change of compression level will occur somewhere near before the end of the so far given input.
SetStrategy Sets the compression strategy. Strategy is one of DEFAULT_STRATEGY, HUFFMAN_ONLY and FILTERED. For the exact position where the strategy is changed, the same as for setLevel() applies.
ToString (inherited from Object)Select the method name to go to the Microsoft documentation.

Protected Instance Methods

Finalize (inherited from Object)Select the method name to go to the Microsoft documentation.
MemberwiseClone (inherited from Object)Select the method name to go to the Microsoft documentation.

See Also

Deflater Class | ICSharpCode.SharpZipLib.Zip.Compression Namespace