GP2X Zip / Unzip App For Gp2x


streak

Active Member
Joined
Jul 29, 2007
Messages
690
Age
41
Location
Poland & UK // Currently: Ipswich
Website
www.openpandora.pl
How about Zip / Unzip application for GP2X. It also could be usefull to make "installer application" for emus/games/other. Imagine that all files downloaded from gp2x.de could be copied directly and depacked / installed on gp2x on fly...

How about that ?

Cheers
StreaK
 
The GP2X already has tar on it so you can "untar" a compressed file already. I tried this for installing the X server in 2XRally but it's horribly slow because of the speed of reads and writes from/to the SD card.

I thought the processing for decompression would be a problem but untarring a compressed or uncompressed image makes little difference to the speed - the SD card is the limiting factor.
 
If you need to download the stuff with your PC, you may as well extract the archive with it too.
 
Squidge said:
If you need to download the stuff with your PC, you may as well extract the archive with it too.
Yeah, but in case you're on holiday somewhere [ lets there be north pole :p ] with no PC, and you have only 1 gb card and a lot of stuff on it [ many emus and roms ] and no space to use them all ... the unzip/zip will be wery usefull. You could zip all emus / rom that youre not playing at the moment, and unzip all that you would like to play in this moment...

you know its extreme situation, but still possible... :D
 
Last edited by a moderator:
I've put the data for some of the apps and games on my cards into cramfs images. Its not as good as zip, but for a few games and programs it's worth it.
 
some games (enigma) have built in support for zipios, which lets them access their data files inside zip files using the same abstracted code as when accessing them in real directories.
 
Sparr said:
some games (enigma) have built in support for zipios, which lets them access their data files inside zip files using the same abstracted code as when accessing them in real directories.
Think windows does on the fly compression to see what it's like, I just don't see it as very practical especially in gaming where performance is everything. Zip can be a real grind on some things like trying to compress the nearly already compressed, you just have to measure your trade off of space for speed. Since it's a linux device you can probably use fuse to wrap anything anyway you like. Unless it's changed I think the thing with cramfs is it was read only, have to expand it somewhere, trading off static storage space for dynamic.
 
Last edited by a moderator:
CramFS only uses a little bit of RAM (and no disk space) for on the fly decompression, and the decompression isn't that slow. There is a speed trade off, but for a lot of things its negligible. But ZIP provides better compression (at a price of course).
 
I'm with woogal here - zipping/unzipping is already present in emulators who have large, mostly empty rom files. I don't see the need for it for just file management - 2Gb cards are dirt cheap (I bought four for £3 each on Amazon about six months ago) and there's no one game that takes more than a hundred megs or so (Quake being the largest game?). Even then, it's possible/practical to have several cards with sets of programs - one for emu's, one for homebrew, one for music, one for video and you can carry them around with zero inconvenience. Even if you just decide to keep card images and then decide what card to take with you each day and image it onto the only SD card you own.

Looking at my GP2X - emulators spend more time starting up the games because they are reading the compressed versions from the card and then unzipping them into memory than they do doing anything else - Up to ten seconds for very large ziproms, which then take a fraction of a second to "byte-swap" or whatever else the emu has to do to them once they're in memory. You save a bit of card space (much more for roms which can be mostly zero's but still have to "be" 64Mb large or whatever) for a small inconvenience but it's not really worth the trade-off on anything else.

To be honest, I'd think that things like UPX might make a better job - this compresses executables and adds a short decompression routine to the start of their code. I'd be surprised if people weren't already using something similar on the larger GP2X programs. Everything else program/video/music-wise is either already compressed, too small to make a difference, or can't be compressed for good reason.

I haven't had my GP2X for long but I notice things like - most things already use PNG or OGG or files compressed in some way, the source code that's included in some games can be deleted if you aren't going to use it and saves nearly 50% of the space of the game (because of block allocation etc. on many small files), the same for instructions etc. Even doing things like arranging things into nice folders (without ten-deep subdirectories) can save you space. But stuff that could be compressed/decompressed "on-the-fly" as you mention wouldn't really save you much more than the space needed for a compression util + the scripts to compress/uncompress on demand.

The only thing that would really benefit MIGHT be plaintext e-Books but who here really uses the e-Book functions? PDF's, etc. are usually already compressed with ZIP internally, by the way.
 
StreaK said:
Yeah, but in case you're on holiday somewhere [ lets there be north pole :p ] with no PC, and you have only 1 gb card and a lot of stuff on it [ many emus and roms ] and no space to use them all ... the unzip/zip will be wery usefull. You could zip all emus / rom that youre not playing at the moment, and unzip all that you would like to play in this moment...
You can zip up most roms and still play them in zipped form. You can compress emu executables and still use them without unzipping. What else is left?
 
Last edited by a moderator:
StreaK said:
How about Zip / Unzip application for GP2X. It also could be usefull to make "installer application" for emus/games/other. Imagine that all files downloaded from gp2x.de could be copied directly and depacked / installed on gp2x on fly...

How about that ?

Cheers
StreaK
if you download the busybox utility you will have access to:
bzip2 - bunzip2
gzip - gunzip (these may come with system)
unlzma
unzip

what more could you want :)
 
Last edited by a moderator:
Back
Top