[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] [PATCH] lzmacat for busybox
From:       Christian Leber <christian () leber ! de>
Date:       2005-06-22 22:35:55
Message-ID: 20050622223555.GA12462 () core ! home
[Download RAW message or body]

On Fri, Jun 17, 2005 at 06:52:50AM +0800, Ming-Ching Tiew wrote:

> That's besides the point as asking to users to decide which dictionary
> size to use is hopeless and it is natural that users will pick any sizes
> which he chooses. 

Well, people who don't know that they are using some odd tiny memory
system won't even know how to use lzma at all.

> > Either it will be a few kb or it will get dog slow in the end.
> It adds less than two hundred bytes for you informations.

It was dog slow, right?

As far as i can see i get a 14,5 kb sized binary with your new
lzmacat after stripping, my lzmacat (like any other with only one copy
of LzmaDecode) is 6 kb smaller.

Actually you don't need this, because it doesn't matter when you malloc
8 MB, as long as you don't use it

For example:

./lzmacat file.lzma >file.c

-rw-r--r--  1 ijuz ijuz   16117 Jun 22 23:45 file.c
-rw-r--r--  1 ijuz ijuz    3566 Jun 22 23:45 file.lzma


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                  \
 12851 ijuz      24   4  9920  424  288 S  0.0  0.0   0:00.00 lzmacat

So worst case memory usage is 712 kb of actuall memory, despite i
malloced 8 MB.  (including 2*64 kb buffer)

(with a 1 MB lzma file about 1,8 MB of memory was used, with memory to
memory decompression the memory usage would have been higher)


Christian Leber

-- 
http://www.nosoftwarepatents.com



_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic