Unrar Lib Ported To The Gp32 & Gmod Released


A600

Certified Guru
Joined
Mar 9, 2003
Messages
368
It can be downloaded here

source: gp32spain

[Mod - Title updated so I don't have to worry about merging ;) ]
 
Ah he finally finished porting it :)

From last we spoke, he said he couldn't add in compression because of some legal issues, so this will only decompress (which is why it is just an UNrar lib). But RAR file sizes are usually quite a bit smaller then ZIP, so we may see programs incorporate this in the future for decompression. Also, he said it would only accept Winrar 2.x or earlier for Winrar versions.

Edited for a mistake
 
Actually the difference is really noticeable when working with big-sized files or hundreds of files. I have just tried ZIPping and RARing the USA-Europe part of the GoodSMS set (v2.01), which is 92,326K in size unpacked. Here are the results (making one big zip and one big rar archive):

ZIP -> 46,244K
RAR -> 43,894K

About 2.5MB spared, which is nice, but when packing smaller things, the results are not that surprising. For instance a genesis game: Alladin (E) [!] - 2048K

ZIP -> 1159K
RAR -> 1085K

The opportunity to use rar archives is pleasing, though greatest differences occur when packing data that wouldnt fit on a whole smc. Anyway, this was just to prevent questions like "Whats the difference between the compression ratio of ZIP and RAR?"
 
Is it possible for someone to add this to GPDOOM or GPQuake ???
 
Steve-O posted on Jul 21 2004 at 09:30 AM said:
Is it possible for someone to add this to GPDOOM or GPQuake ???
Craig looked into it on Doom a whlie ago and found it couldn't be done or would be impractical I think. The file would still need to be unzipped to the smc in order to run so you would need to have that space free anyway.

Maybe just compress the files in GPFM when you aren't using doom, then uncompress when you want to play? Although you'd still need the free space then anyway :p.
 
Last edited by a moderator:
unrarlib can't only extract a part of a compressed file, so can't be used for doom
and a wad file is bigger than the gp32 ram size, the lib uncompress data in ram (and require 1mo for decompression)

> it would only accept Winrar 3.x or earlier for Winrar versions.
no, it's winrar 2.x ^^

here is a new Gtris release, with Gmod included : http://procvor.free.fr/Gmod.fxe
push L to change muzic, search for muzic in gp:\hey.rar, can work without the rar.
 
char *path = "*" ; // path of the file we want uncompress from the rar
char *data_ptr = NULL ; // a pointer where we'll can found our uncompressed file
    ulong  data_size ; // a var where will be stored size of uncompressed file

yep = urarlib_get(&data_ptr, &data_size, path,"gp:\\hey.rar","password") ;

@rov :If I replace the name of the file I want to uncompress for "*", will all file inside the .rar be uncompressed?. If not, how can it be done?

TIA
 
no it will not work if you put *

to uncompress all, just list the rar and after, uncompress one by one all the files.

i start to write a function who can made that (with a rar from disk or memory and save onto disk or in memory)
but actually not work :p
 
meh, this rules :)
how about making a program that can unrar, unlzo, unzip, ungzip, unbzip2?
or making a library-pack with those functions, would be nice "compression-lib" ^^
 
Back
Top