Save zip files

BlitzMax Forums/BlitzMax Programming/Save zip files

_JIM(Posted 2010) [#1]
Hi,

I've tried looking around, but I don't think I've seen any module that can save zip files. Is there any around?

I'm basicly looking for an easy way for the editor to save a pack and the game itself to load it. Doesn't really have to be a zip file, but I figured that makes the loading easy enough with koriolis zipstream and gman's zipengine around with "zip::" and "zipe::".


Tommo(Posted 2010) [#2]
Can't you use ZipEngine to write your Zip file? It's quite handy.


_JIM(Posted 2010) [#3]
Well that's what I'm looking for, but haven't found any tutorial or sample code. I've looked through the documentation but I only found a function for adding files to a zip file.


Volker(Posted 2010) [#4]
The method AddStream() accepts a bankstream. Try that.

There is although a pack file class in the codearchive.
May fit your needs with some modifications.
http://blitzbasic.com/codearcs/codearcs.php?code=2559


_JIM(Posted 2010) [#5]
I feel like an idiot now. All I had to do was basicly to just open zipdemo.bmx in gman's mod.


xlsior(Posted 2010) [#6]
Alternatively, there's Koriolis' zipstream module.


_JIM(Posted 2010) [#7]
[quote]
Alternatively, there's Koriolis' zipstream module.
[\quote]

I believe it doesn't support the saving of zip files. I may be wrong though.

Anyway, banks + AddStream() = win. I'm probably never going to save separate files from my editors from now on, since this was so easy to set up.