Page 1 of 1

Extracting, and Creating Zip Archives

Posted: Sun Aug 17, 2003 5:53 pm
by Toris
Hi,

I've searched the forum for information about extracting and creating zip archives from within PureBasic, but I was only able to come accross information about rars.

So, I was wondering if anyone had any information about how to do this. There will only be 1 file per archive.

What I wish to do, is save a sprite to a zip, and load a sprite from a zip.

Any information is greatly appreciated.

Cheers,
-Toris

ZLIB andRunProgram

Posted: Tue Aug 19, 2003 2:53 am
by oldefoxx
ZLIB is a library of routines for zipping and unzipping files from within your program. You can also use RunProgram() or ShellExecute() to call an archive program such as PKZIP or WinZIP directly. Pure programmers insist that the better way is to call from a library, but I am of the mind that whatever works for you should suffice. The only problem with RunProgram() and ShellExecute() is your assumption that the needed archive program is on the target PC.

ZLIB is prevalent on a number of programming sites around the internet. A good search engine should turn it up from several sources. A full archive package may offer some benefits that go beyond the routines found in ZLIB, but you have the advantage of making that call for yourself if you like.

Posted: Tue Aug 19, 2003 3:25 am
by Karbon
zlib Homepage

http://www.gzip.org/zlib/

zlib DLL

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

An excellent library, I've used it a lot in web apps!