Go to file
Agaricus ea80a4eb91 Fix 'ZipException: invalid entry compressed size' mapping non-ASCII text files
When remapping Minecraft + Forge, was failing with:

Exception in thread "main" java.util.zip.ZipException: invalid entry compressed size (expected 13048 but got 13084 bytes)
  at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:248)
    at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:343)
    at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:238)
    at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:360)
    at net.md_5.specialsource.JarRemapper.remapJar(JarRemapper.java:141)
    at net.md_5.specialsource.SpecialSource.main(SpecialSource.java:220)

Full details: https://gist.github.com/agaricusb/5036166

To fix this, we always create a JarEntry. Explanation from:
http://javahowto.blogspot.com/2011/07/how-to-programmatically-copy-jar-files.html

It usually occurs when text file entries in the source jar file contain some non-ASCII characters such as ^I ^Z ^D ^C. Some common files are META-INF/COPYRIGHT.html, META-INF/LICENSE.txt, etc, probably because these files were created in a non-ASCII editor but saved as text files. Open them in vi or vim to see these offending characters. To avoid this type of ZipException, always create a new JarEntry with the same name, and pass it to putNextEntry() method. Do not pass the existing jar entry from the source jar file to putNextEntry() method.
2013-02-25 21:42:44 -08:00
src/main/java/net/md_5/specialsource Fix 'ZipException: invalid entry compressed size' mapping non-ASCII text files 2013-02-25 21:42:44 -08:00
.gitignore Initial commit. 2012-12-08 08:52:58 +11:00
LICENSE Fix license formatting. 2012-12-09 10:15:58 +11:00
pom.xml Add opencsv dependency 2013-02-20 19:42:40 -08:00
README.md Initial commit. 2012-12-08 08:52:58 +11:00

Special Source

Automatic generator and renamer of jar obfuscation mappings.