Simple Zip functions
BlitzMax Forums/BlitzMax Programming/Simple Zip functions
| ||
I'm totally missing the mark here. Anyone know why this doesn't work? I don't want to use an existing lib I just want a simple one with minimal functionality.Local zip:TStream = ReadZip("media.zip") image1 = LoadImage("zip::test.png") CloseZip(zip) Function ReadZip:TStream(zfolder$) Local stream:TStream stream = OpenStream(zfolder) Return stream End Function Function CloseZip(zstream:TStream) CloseStream(zstream) End Function |
| ||
Using zip:: will only work if you use the zipstream module, its not a build in feature of Blitzmax. At least I don't seem to remember it is. |
| ||
Hmm...I'm trying TStreams and TBanks. Can't seem to get a simple image loaded from a zip file. :( |
| ||
Pub.Zip will decompress a zip data stream. You need something like the ZipStream module to understand the pk-zip format which contains extra information for directory/file support. Zip and Zip are not necessarily the same thing :-) |
| ||
I just decided to go with the zipstream module like you guys suggested. It's already working great and I didn't realize it was so time consuming to write. I have better things to do than re-invent the wheel. :) |