Share via


Pack200.IPacker.SegmentLimit Field

Definition

This property is a numeral giving the estimated target size N (in bytes) of each archive segment.

[Android.Runtime.Register("SEGMENT_LIMIT")]
public const string SegmentLimit;
[<Android.Runtime.Register("SEGMENT_LIMIT")>]
val mutable SegmentLimit : string

Field Value

Attributes

Remarks

This property is a numeral giving the estimated target size N (in bytes) of each archive segment. If a single input file requires more than N bytes, it will be given its own archive segment.

As a special case, a value of -1 will produce a single large segment with all input files, while a value of 0 will produce one segment for each class. Larger archive segments result in less fragmentation and better compression, but processing them requires more memory.

The size of each segment is estimated by counting the size of each input file to be transmitted in the segment, along with the size of its name and other transmitted properties.

The default is -1, which means the packer will always create a single segment output file. In cases where extremely large output files are generated, users are strongly encouraged to use segmenting or break up the input file into smaller JARs.

A 10Mb JAR packed without this limit will typically pack about 10% smaller, but the packer may require a larger Java heap (about ten times the segment limit).

Java documentation for java.util.jar.Pack200.Packer.SEGMENT_LIMIT.

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