gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Is there a way to extract .rar and .zip archives ON the DS ?

#106632 - pas - Sat Oct 21, 2006 7:27 pm

Hello all,

I just wantet to ask you if there is a programm/homebrew available on the DS that can unzip .rar and .zip files (Like Winrar and Winzip can do for Windows ) ?

I heard a long time ago that dslinux can extract .zip files, but I don't know if this is true...

I wished there would be a program like that...

Hope someone knows an answer:

Pas

#106635 - josath - Sat Oct 21, 2006 7:33 pm

Is there any reason why you want to do this? It may be a better idea to use a simpler compression algorithm if it is for the purpose of writing some homebrew. Maybe something like LZO or aPlib.

#106637 - LiraNuna - Sat Oct 21, 2006 8:13 pm

You can also use LZ77 compression. There are BIOS calls that support decompression to both RAM and VRAM.
You can use the command line tool "gbalzss" (works on DS too) to compress, and some function call i wrote in another thread to decompress to VRAM. to decompress to RAM, use swiDecompressWram().
_________________
Private property.
Violators will be shot, survivors will be shot again.

#106652 - tepples - Sun Oct 22, 2006 3:10 am

josath wrote:
Is there any reason why you want to do this? It may be a better idea to use a simpler compression algorithm if it is for the purpose of writing some homebrew.

But in such a case, wouldn't you need to create a custom GUI for end users to create archives using such a simpler compression algorithm, on all three of Microsoft Windows, Mac OS X, and GNU/Linux? I would imagine that re-using .zip or .7z would make it easier for the programmer.

You could try porting Info-ZIP's UnZip to the Nintendo DS.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#106661 - MaHe - Sun Oct 22, 2006 9:06 am

josath wrote:
Is there any reason why you want to do this?
Well, if you travel, you can download new homebrew, files etc. on the go with DSLinux, but most of the times, they're in ZIP, RAR or 7z files ...
_________________
[ Crimson and Black Nintendo DS Lite | CycloDS Evolution | EZ-Flash 3-in-1 | 1 GB Transcend microSD ]

#106667 - tepples - Sun Oct 22, 2006 11:38 am

Then you could probably just recompile Info-ZIP UnZip for DSLinux.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#106669 - pas - Sun Oct 22, 2006 12:41 pm

Yep, 100 points for tepples, I would find this very handy for surf around with DSlinux, download some Homebrew stuff and then be anble to decompress ON the DS (but not in DSlinux, better in a standalone programm or a program implementet in DSOrganize)

#106778 - PypeBros - Mon Oct 23, 2006 9:59 am

any portable C library for compression/uncompression would do the trick, no

...

ooh, i can see the amiga "uncrunching tunes" appearing back on the DS scene :P
_________________
SEDS: Sprite Edition on DS :: modplayer

#106974 - sonny_jim - Wed Oct 25, 2006 11:47 am

I tried enabling the busybox version of tar in DSLinux, it seemed to compile and run but I couldn't get it to do anything useful (I think I was using wrong options). Someone did get unzip working, but I can't remember if it causes an error somewhere:
http://www.dslinux.org/index.php?showtopic=1459&hl=unzip

I've been using DSLinux for on-the-road file management as I don't even nearly trust the write support for SCSD in the FAT lib.

#107112 - sonny_jim - Thu Oct 26, 2006 7:42 pm

Ah, fixed it. Needed to make clean in the busybox dir. So far I've got:

tar
gunzip
bunzip2
unzip (doesn't support all zip archives, but it works)

None of these afaik are in the normal builds yet though. I've tried unrar but it doesn't seem to compile for me yet.

#107322 - pas - Sat Oct 28, 2006 2:48 pm

Hmmm. Good to know that someone got atleast Unzip to work... but I wished this Unzip Programm would be implementet INTO DSOrganize... So we could Unzip our .rar and our .zip files with ease...

I mean the Source of DSOrganize is there... so: Why not try it at least ?

#107325 - kusma - Sat Oct 28, 2006 3:00 pm

perhaps unrarlib can be used for rar-support?

#107337 - pas - Sat Oct 28, 2006 6:22 pm

would be cool if it could...