Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Using ZIP files to store files

Author
Message
Briere
19
Years of Service
User Offline
Joined: 28th Feb 2005
Location: Amherst New York, United States
Posted: 11th May 2006 22:26
How can I use a ZIP file to store my games files?

I want to protect them from the casual user / hacker.

I was thinking of putting them into a zip file, and then giving it a different extention. Then renaming the file before opening, and re naming it back to normal when its closed.

But I dont know how I can do this.

If I put it in a zip file, what would be the address to the files?

I cant do folder/zipfile.zip/filename.ext
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 11th May 2006 22:40 Edited at: 11th May 2006 22:41
You have to buy a ZIP compression SDK (about £70 upwards), or you can try to interface with 7Zip. RAR compression is closed source, however the SDK for decompression is availiable for free

The other alternative is either to write your own system or call Zip via command line arguments.

Web Site:http://www.nicholaskingsley.co.uk
Al:Tina wants me to pop out of her birthday cake, and guess what she doesn't want me to wear...
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th May 2006 00:59
There's a perfect free library available for compression/decompression, without the need to pay anything - it's called zlib, and there's a package that uses it called minizip.

http://www.zlib.net/
http://www.winimage.com/zLibDll/minizip.html

BTW, there's no need to rename anything when you use the minizip library, and it also provides standard zip compatible (8.0 and prior) encryption/decryption too.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 12th May 2006 09:34 Edited at: 12th May 2006 09:35
I tried zlib ages ago, and found it couldn't cope with files created by WinZip - nor could it decompress files created by itself. So wasn't much use.

Whether its changed or not now, I dont know.

Web Site:http://www.nicholaskingsley.co.uk
Al:If we knew the unknown, the unknown wouldn't be unknown.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th May 2006 15:08
Huh? Well, I've been using the minizip program under Unix & Windows for several years now.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 12th May 2006 16:14
Might have improved then

Web Site:http://www.nicholaskingsley.co.uk
Al:If we knew the unknown, the unknown wouldn't be unknown.
Briere
19
Years of Service
User Offline
Joined: 28th Feb 2005
Location: Amherst New York, United States
Posted: 22nd Jun 2006 05:23
How would you write your own?
Whats the theory behind it?
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 22nd Jun 2006 09:10
@Briere, I'm sorry but I almost spat my coffee out when I read your question... You don't seriously believe that you'll get an answer here do you? Why write your own ZIP algorithm when there are countless resources for using an existing library or DLL.

Paul.


Home of the Cartography Shop - DarkBASIC Professional map importer
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 22nd Jun 2006 11:12
The theory behind the zip compression system is fairly simple (and there is plenty of information about it on der webz).

To be honest though, its simpler to ignore how it all works and get either a free one or buy a library.

Come to the last Unofficial DBPro Convention (http://convention.logicstudios.net/)
Dont do anything I wouldn't do. But if you do, take pictures.
Briere
19
Years of Service
User Offline
Joined: 28th Feb 2005
Location: Amherst New York, United States
Posted: 22nd Jun 2006 17:46
I looked at gzip and there was no documentation what so ever.
Not worth my time, I dont want it THAT badly to go figure everything out. After all Im just making games for fun.

Login to post a reply

Server time is: 2024-05-18 22:09:12
Your offset time is: 2024-05-18 22:09:12