最近更新到最新版本Unity3D,使用IL2CPP发布64位IOS应用的时候发现了这个问题。它导致我原来加密的文件解压不出来了,查了一天,修正了。
1. 在github下载zip的原码,
2. 直接放在unity3d工程下,编译的时候,编译器会直接覆盖系统自带的zip。
3. 修改源文件:~/Zip/Compression/Streams/StreamManipulator.cs
From
buffer_ |= (uint)((window_[windowStart_++] & 0xff | (window_[windowStart_++] & 0xff) << 8) << bitsInBuffer_);
To
byte [] aBuf = new byte[2]; aBuf[0] = window_[windowStart_++]; aBuf[1] = window_[windowStart_++]; buffer_ |= (uint)(( (aBuf[0] & 0xff) | ((aBuf[1] & 0xff) << 8) ) << bitsInBuffer_);
求大公司工作机会!
Unity3D 4.6.2版本IL2CPP编译环境下Zip压缩的Bug
原文地址:http://blog.csdn.net/zqtechnology/article/details/43667733