• Welcome to Jose's Read Only Forum 2023.
 

zLib v. 1.2.5

Started by José Roca, April 09, 2011, 01:05:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca

 
About zLib

zLib is a compression library written by Jean-Loup Gailly (compression) and Mark Adler (decompression).

Home Page: http://www.zlib.net/

The calling convention used in zlib1.dll is CDECL.

zLibWapi.dll is a library that merges the standard zLib library with the functions written with Gilles Volant to compress and uncompress .zip files using zLib. It uses the STDCALL calling convention.

Home Page: http://www.winimage.com/zLibDll/

The attached file contains my translation of the headers to PowerBASIC of both zLib and zLibWapi, as well as zLibWapi.dll. In addition, zLibWapi.inc also contains some wrapper functions to compress and uncompress strings and to add files to a .zip file.

Eros Olmi

Sorry to re-open this old post but maybe someone has already faced this problem.

I'm trying to extract file from password protected zip files.
I use UnzOpenCurrentFilePassword but for some reason it generated an error.
The same function is working fine if password is null

I read somewhere password must be CRC32 encrypted before passed to that function but didn't find any info on how to do.

Does someone had similar problems?
Thanks
Eros
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Eros Olmi

I found this: http://stackoverflow.com/questions/6711173/how-to-use-unzopencurrentfilepassword
I suppose the only way is to re-compile C sources of zLibWapi.dll removing NOUNCRYPT
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Eros Olmi

Problem solved.

For some reason attached zLibWapi.dll version 1.2.5 doesn't work with password protected files.
Instead version 1.2.3 downloadable from http://www.winimage.com/zLibDll/index.html seems working fine.
thinBasic Script Interpreter - www.thinbasic.com | www.thinbasic.com/community
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB