Author Topic: zLib v. 1.2.5  (Read 6454 times)

0 Members and 1 Guest are viewing this topic.

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2483
  • User-Rate: +204/-0
zLib v. 1.2.5
« on: April 09, 2011, 01:05:05 PM »
 
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.
« Last Edit: August 06, 2011, 02:36:11 PM by José Roca »

Offline Eros Olmi

  • Full Member
  • ***
  • Posts: 243
  • User-Rate: +18/-7
    • thinBasic
Re: zLib v. 1.2.5
« Reply #1 on: March 08, 2016, 12:06:54 AM »
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

Offline Eros Olmi

  • Full Member
  • ***
  • Posts: 243
  • User-Rate: +18/-7
    • thinBasic
Re: zLib v. 1.2.5
« Reply #2 on: March 08, 2016, 01:26:43 AM »
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

Offline Eros Olmi

  • Full Member
  • ***
  • Posts: 243
  • User-Rate: +18/-7
    • thinBasic
Re: zLib v. 1.2.5
« Reply #3 on: March 08, 2016, 01:36:12 AM »
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