Menu

Create uncompressed JAR?

Help
Aleks
2014-10-05
2014-10-19
  • Aleks

    Aleks - 2014-10-05

    Hello,
    Is it possible to configure ProGuard to generate an uncompressed JAR?
    I.e. jar -0 ?
    I have need for that because of an application that can't read compressed JARs.
    Thanks

     
  • Eric Lafortune

    Eric Lafortune - 2014-10-05

    Are you sure that compression makes a difference? I'm only aware of some low-level performance optimizations in Android that rely on files not being compressed. ProGuard does not have a setting to control it (DexGuard does).

    However, ProGuard by default removes directory entries from jar/war/ear/zip files. Occasionally, code depends on them. You can easily try if preserving them helps:

    -keepdirectories **
    

    Otherwise, you should repackage your jar.

    Eric

     
    • Aleks

      Aleks - 2014-10-19

      Hello,
      Yes, the compression makes a difference, it's a third party Win32 app that reads JAR-files and lists a class that implements a certain interface.
      I did as you suggested and performed a repackage using my Ant script, basically it performs an unzip and then zip with compress="false" level="0".
      Thanks