[Zlib-devel] zlib1.dll version 1.2.8

Jan Nijtmans nijtmans at users.sourceforge.net
Tue May 14 06:21:35 EDT 2013


2013/5/14 Jan Nijtmans <nijtmans at users.sourceforge.net>:
> Is anyone aware of the those problems with the AMD64 optimized
> versions? Is this problem the reason there is no official AMD64
> zlib1.dll yet? Or is there another reason? I didn't go deeper
> yet in investigating this problem.

Answering my own question, the apparent reason for this
problem is that WIN64 has a 32-bit long type, while all
other AMD64 platforms use a 64-bit long type.

On WIN64, the offsets in the "internal_state" structure
are as follows:

size pointer=8
#define dsWSize         68
#define dsWMask         76
#define dsWindow        80
#define dsPrev          96
#define dsMatchLen      136
#define dsPrevMatch     140
#define dsStrStart      148
#define dsMatchStart    152
#define dsLookahead     156
#define dsPrevLen       160
#define dsMaxChainLen   164
#define dsGoodMatch     180
#define dsNiceMatch     184

That doesn't match the various offsets I see in
the assembler code, which explains a lot.
Conclusion: none of the AMD64 optimizations
are usable on WIN64.

Regards,
           Jan Nijtmans




More information about the Zlib-devel mailing list