Share via


Deflater.SetStrategy(Int32) Method

Definition

Sets the compression strategy to the specified value.

[Android.Runtime.Register("setStrategy", "(I)V", "GetSetStrategy_IHandler")]
public virtual void SetStrategy (int strategy);
[<Android.Runtime.Register("setStrategy", "(I)V", "GetSetStrategy_IHandler")>]
abstract member SetStrategy : int -> unit
override this.SetStrategy : int -> unit

Parameters

strategy
Int32

the new compression strategy

Attributes

Exceptions

If the strategy specified is not one of FILTERED, HUFFMAN_ONLY or DEFAULT_STRATEGY.

Remarks

Sets the compression strategy to the specified value.

If the compression strategy is changed, the next invocation of deflate will compress the input available so far with the old strategy (and may be flushed); the new strategy will take effect only after that invocation.

Java documentation for java.util.zip.Deflater.setStrategy(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to