Zlib have some bug in arm64-v8a?

my project is cocos 3.8-lua I upgrade my cocos to 3.13.1 for google 8.1 support 64 decices.then I found
run arm64-v8a so have some problem ,in unzip.cpp

in function unzReadCurrentFile always return Z_DATA_ERROR。but run armabi is ok

i guess arm64-v8a libz.a is not correct?

then can I use chinese?

how do you guess my project(cocos3.8-lua) support google 64 devices,

Perhaps @R101, @smitpatel88 might have thoughts on this.

thanks again

I dont use Lua so wont be able to help much.
But are you using unzip.cpp any function from this? If you comment that then its working?

@tell_me_why Are you using zip files that are encrypted with a password? If so, then this may be related to MiniZip issues, as you can see here:


Please do tell us if you’re using password protected zip files. Also, please apply the fix from the link above and let us know if it works for you.

Other than that, the MiniZip included with Cocos2d-x (up to the latest release) should probably be updated to a more recent version.

1 Like

@R101 what did you search to find this issue?

@slackmoehrle Typed this into Google: “unzip Z_DATA_ERROR unzReadCurrentFile”

Found this (probably 2nd link from the top in the results):

That led me to the MiniZip info. FYI, I didn’t even know Cocos2d-x was using MiniZip! :slight_smile:

I don’t know if it’s the actual issue though, but from looking at the MiniZip repository, Cocos2d-x is using a very old version of it, which clearly has issues in 64Bit mode.

yeah, I don’t think this dep has been updated in quite some time. Easy enough to test and see how newer versions work and if and code needs to be refactored.

yeh,i am use a zip with password 。i will try this fix. thanks.

I find a solution fix my error

it is crypt.h
change #define CRC32(c, b) (((pcrc_32_tab+(((int)© ^ (b)) & 0xff))) ^ (© >> 8)) to
#define CRC32(c, b) ((
(get_crc_table()+(((int)© ^ (b)) & 0xff))) ^ (© >> 8))

1 Like

I am on cocos 3.15 and this solution works on android arm64-x86, thanks!

#define CRC32(c, b) ((*(get_crc_table()+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))

There is a PR for it: https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/pull/357. You can have a try.

Could anybody conform that, the PR above fixes the bug?

I haven’t tried the PR because my cocos version is 3.15 (or can I just change the file according to the PR to try it?)

in my case, only changing the #define CRC32 works