PDA

View Full Version : Free code to read/write zip files with passwords using Freepascal?



paul_nicholls
03-08-2011, 05:29 AM
Hi all,
I was wanting to be able to read from (and write to) password protected zip files using Freepascal, but I am not sure what I can use?

Freepascal comes with paszlib, but that doesn't seem to handle password projected zip files..

I am hoping for a free option, and hopefully be cross-platform compatible too :)

Any ideas?

cheers,
Paul

Daikrys
03-08-2011, 01:30 PM
hey Paul,

i dont know if all this components are crossplattform but its up to you to check this ;>

TZIP (http://angusj.com/delphi/)
ZipForge (http://componentace.com/zip_component_zip_delphi_zipforge.htm)
KAZip (http://www.vclcomponents.com/Delphi/Compression__Encryption/KAZip-info.html)
Abbrevia (http://sourceforge.net/projects/tpabbrevia/)

you can also look at
Torry (http://www.torry.net/pages.php?id=300)

EDIT: oh im not familar with what FreePascal can use or not cause i use Delphi :/
EDIT2: after reading and testing some stuff i would recomment Abbrevia (http://sourceforge.net/projects/tpabbrevia/) cause it fit all what you asked for

wagenheimer
03-08-2011, 02:58 PM
This is not related to your question, but I'm trying to use paszlib to decompress a stream from a .gz file. But I could not make it works!

Anybody here have any working example of this?

Thanks!

AirPas
03-08-2011, 04:15 PM
by coding , i don't think you can read the content of a protected zip file , unless you know the password

Daikrys
03-08-2011, 04:21 PM
This is not related to your question, but I'm trying to use paszlib to decompress a stream from a .gz file. But I could not make it works!

Anybody here have any working example of this?

Thanks!

as i know paszlib isnt up to date
instead use zlib pascal port (http://home.netsurf.de/wolfgang.ehrhardt/zlibw114_2009-07-25.zip) its based on paszlib but its up to date
another one would be the continued paszlib project called paszlib-sg but as i know its only compatible up to delphi 5 (paszlib-sg (http://sageshome.net/oss/paszlib-sg.php))


by coding , i don't think you can read the content of a protected zip file , unless you know the password

yeah i think he mean he want to write to an archive he compiled and where he know the password ;)
i think he like to use a compressed archive for his games or am i wrong? :>

paul_nicholls
03-08-2011, 09:09 PM
Thanks to all, I will investigate the options given :)

And yes, I want to read from a protected archive that I built to use it in a game LOL

cheers,
Paul