Opening rar or zip from blitz3d

Blitz3D Forums/Blitz3D Programming/Opening rar or zip from blitz3d

Hardcoal(Posted 2011) [#1]
anyone know how to such a thing?
i want to open a text file from blitz3d
and encrypt it from blitz3d too


Adam Novagen(Posted 2011) [#2]
Not sure about encryption, but if you dig around a bit I'm pretty sure there's a ZIP lib for B3D; I believe it's in DLL form.


Rroff(Posted 2011) [#3]
Can't help you directly but I made a very basic wrapped of zlib.dll for my project:

.lib "zlib1.dll"

gzopen% (sFile$, sMode$) : "gzopen"
gzgetc% (gzFile%) : "gzgetc"
gzputc% (gzFile%, iChar%) : "gzputc"
gzeof% (gzFile%) : "gzeof"
gzclose% (gzFile%) : "gzclose"
gzread% (gzFile%, buffer*, iLen%) : "gzread"
gzwrite% (gzFile%, buffer*, iLen%) : "gzwrite"
gzputs% (gzFile%, instring$) : "gzputs"
gzgets% (gzFile%, buffer$, iLen%) : "gzgets"


decls file

Which works pretty well for b3d stuff imo - very fast low overheads and decent compression. zlib dll and documentation available freely http://zlib.net/

Last edited 2011


Hardcoal(Posted 2011) [#4]
im comfused ? what should i download on that page
can you get me a link


Rroff(Posted 2011) [#5]
Are you just trying to encrypt a file or do you want to compress it or both encrypt and compress?

If its just simple encryption then the XOR command can be used to do what you want (will keep all but the more dedicated hackers from decrypting it).


Hardcoal(Posted 2011) [#6]
i just want to execute encryption and compress commands from blitz
and to specify the file i want to excute it on.
also i want to send a key from blitz to the encryptor.

medium level of protection is sufficient