loading resouces from a zip help!

Blitz3D Forums/Blitz3D Programming/loading resouces from a zip help!

Caton(Posted 2014) [#1]
how do I load images,sounds,files,models,textures,files from a zip file in blitz?


Guy Fawkes(Posted 2014) [#2]
You don't.


xlsior(Posted 2014) [#3]
In blitzmax you can use Koriolis' zipstream module, in B3D it probably involves voodoo and sacrificing chickens.


Caton(Posted 2014) [#4]
is there a code to do it?


Caton(Posted 2014) [#5]
http://www.blitzbasic.com/Community/posts.php?topic=63176


Guy Fawkes(Posted 2014) [#6]
Shweet :3


Caton(Posted 2014) [#7]
but how to load images,sounds,textures,music,files from it?


GfK(Posted 2014) [#8]
By using ZipApi_ExtractFile (), as per the documentation.

Your problem is that you have to extract the file to hard drive first, then load the image (or whatever) from there. Really, this process causes more problems than it solves. There is no security benefit, and load times are longer.


Yan(Posted 2014) [#9]
but how to load images,sounds,textures,music,files from it?
You don't...


Rroff(Posted 2014) [#10]
If you want to use compression your probably better off using zlib instead of zip with b3d.

Until there is a feature to load files from memory/other IO stream though there is no elegant way to do it really - I was going to see if it was possible to adapt the runtime dll to load sounds, etc. from a bank but not really had time to get my head around the B3D source code yet and it'll be after Christmas now til I do.