.tar.gz in Blitzmax?

BlitzMax Forums/BlitzMax Programming/.tar.gz in Blitzmax?

xlsior(Posted 2008) [#1]
Does anyone happen to know of any source to read/extract a .tar.gz archive from within BlitzMax?


Brucey(Posted 2008) [#2]
Yeah, but probably not using the modules you'd like :


Output for example :
Executing:targzip.debug
icons/
icons/copy.xpm
icons/cut.xpm
icons/help.xpm
icons/new.xpm
icons/open.xpm
icons/preview.xpm
icons/print.xpm
icons/save.xpm


To extract the data, you could do something like this :
While entry
	Local size:Int = entry.GetSize()
	Local buf:Byte[] = New Byte[size]
				
	arc.Read(buf, size)
	
	entry = arc.GetNextEntry()
Wend


The example is in samples/archiveclassfactory

;-)


xlsior(Posted 2008) [#3]
Ah, thanks.

I did look through all the installed mods on my computers, but didn't see anything that appeared relevant. Must have overlooked this one.

Unfortunately the downside of the wxwidgets modules are the massive size increase of the final executable -- ~4MB instead of the 80KB my app currently takes up. :-?


Brucey(Posted 2008) [#4]
Unfortunately the downside of the wxwidgets modules...

Yeah, I said you wouldn't like it :-)