ea80a4eb91
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. |
||
---|---|---|
src/main/java/net/md_5/specialsource | ||
.gitignore | ||
LICENSE | ||
pom.xml | ||
README.md |
Special Source
Automatic generator and renamer of jar obfuscation mappings.