Pack200 Explained

Pack200, specified in JSR 200[1] (J2SE 1.5), deprecated in JEP 336[2] (Java SE 11) and removed in JEP 367 (Java SE 14),[3] is a compacting archive format developed by Sun, capable of reducing JAR file sizes by up to a factor of 9,[4] with a factor of 3 to 4 seen in practice.[5] [6] Pack200 is optimized for compressing JAR archive files, specifically the Java bytecode portion of the JAR files. Applications of this technology include faster Java application deployment over Java Web Start.

After Pack200, gzip compression is usually applied. In HTTP compression, such content is specified by the Content-Encoding type pack200-gzip. When stored as a file, the extension .pack.gz is used.[7]

Pack200 may also refer to the Pack200 compression tools (pack200 and unpack200) provided in the Java Development Kit from Java 5 until Java 14.

Design

Pack200 modifies the contents of the Java class files in the JAR archive undergoing compression. Transformations to the class files include merging constant pools and removing duplicated attributes.[8] The format is not lossless; it is possible for a JAR file after unpacking to not be identical to how it was before packing.[9]

External links

Notes and References

  1. Web site: JSR 200: Network Transfer Format for Java Archives. . 2014-06-09.
  2. Web site: JEP 336: Deprecate the Pack200 Tools and API . 2018-11-10.
  3. Web site: JEP 367: Remove the Pack200 Tools and API . 2020-06-02.
  4. Web site: Pack200: A Packed Class Deployment Format For Java Applications . 2022-05-14 . docs.oracle.com.
  5. Web site: Smaller Java . 2022-05-14 . dzone.com . en.
  6. Web site: Combining Ant, Jar, Signatures and Pack200 . 2022-05-14 . bfo.com.
  7. Web site: Pack200 and Compression for Network Deployment . 2022-05-14 . web.mit.edu.
  8. Web site: Pack200 Compression Method . 2022-05-14 . www.advancedinstaller.com . en.
  9. Web site: Commons Compress – Commons Compress Pack200 Package . 2022-05-14 . commons.apache.org.