views:

105

answers:

3

What's the minimum memory needed to run a RAR decompression algorithm?

I want to port a RAR decompression algorithm to mobiles (iPhone, Android and BlackBerry) and want to know if there's a bare minimum of memory needed before starting. I've heard that RAR decompression requires much more memory than ZIP decompression.

A: 

Can't give you a concrete number, but I remember using WinRAR back in 2001 on my PocketPC with only 64mb of RAM, about half of which was shared for storage -- so I'm pretty sure a modern phone should suffice.

Rei Miyasaka
I wouldn't be so sure. If I'm not mistaken, Android devices have only 16MB or 24MB for applications.
hgpc
A: 

There are plenty of Comic Viewers on the iPhone that support .cbr so I its doable.

Jeff
I know, but that doesn't answer the question. If possible I want to make a multi-platform RAR decompression algorithm, and iPhone is only one of the target platforms.
hgpc
@hgpc - What, then, are the minimum system specs for the least capable device you would like this to run on? Without solid specifications, it's very difficult to provide a definitive answer.
Brad Larson
I would like to know the minimum memory requirements of a RAR decompression algorithm, which don't depend of the target specs. But to answer your question, let's assume that I have 8MB of RAM and 128MB of external storage for this.
hgpc
+2  A: 

Quite a lot. The maximum size of the dictionary are 4 MB, but at least the official unrar library (which is built from the same source as WinRAR) takes over 24 MB in some decompression algorithms.

(as to the last statement: note that the t is at least 1 MB (uint t=SASize << 20;), but can be more because SASize may be more than 1)

Artefacto
Thanks Artefacto, this is what I what looking for. Can you provide some links/references to accept the answer?
hgpc
@hgpc I added some links.
Artefacto