Jump to content

Pack200

From Alfawiki
Pack200
Company typeSoftware tool / Archive format
IndustrySoftware development / Data compression
Founded2004; 22 years ago (2004)
FounderSun Microsystems
Defunct2020 (2020)
FateDeprecated and removed from Java SE
ProductsPack200 compression utilities (pack200, unpack200)
ParentJava Development Kit (JDK)

Pack200, specified in JSR 200 (J2SE 1.5), was marked as obsolete in JEP 336 (Java SE 11) and subsequently eliminated in JEP 367 (Java SE 14). Originally created by Sun, this archive format is designed to significantly shrink JAR file sizes—achieving reductions up to ninefold, with common decreases ranging between three and four times. Pack200 specializes in compressing the Java bytecode contained within JAR archives, which facilitates quicker Java application startup, especially when deployed through Java Web Start.

Typically, Pack200 compression is applied prior to gzip to achieve additional file size minimization. When used in HTTP compression, this combined method is represented by the Content-Encoding value pack200-gzip, and the associated files bear the .pack.gz suffix.

The designation Pack200 also applies to the compression utilities (pack200 and unpack200) that were bundled with the Java Development Kit from Java 5 until Java 14.

Design

During compression, Pack200 alters the internal structure of Java class files inside the JAR by consolidating constant pools and eliminating redundant attributes. This approach is not fully reversible; as a result, the decompressed JAR may not be identical to its initial version.

References

External links