[PATCH] add a new unlzma applet
Roberto A. Foglietta
me at roberto.foglietta.name
Wed Jan 18 15:51:31 UTC 2006
Rob Landley ha scritto:
> On Wednesday 18 January 2006 02:57, Roberto A. Foglietta wrote:
>
>>Rob Landley ha scritto:
>>
>>>>>And
>>>>>rc_free() there's just no excuse for, it's just a wrapper around free()
>>>>>that's only called once
>>>>
>>>>I somewhat disagree about this. On a purely technical POV, you're right.
>>>>But at a higher "algorithmic" level, this rc_free() allow a total
>>>>abstraction of the rangecoder.
>>>
>>>Meaning what?
>>
>> I think he would say: tomorrow if you want change algorithms the
>>rc_functions changes inside but their API still the same. Is it right?
>
>
> I got that,
I was not sure I was got it myself.
> I'm just wondering what the advantage is. Do we want to change
> algorithms?
>
> Busybox is a slightly weird environment in that we're trying for small and
> simple more than most, and sometimes unwrapping this kind of abstraction lets
> you simplify (and thus shrink) this specific implementation of the code.
> (Admittedly not always.)
>
> I'm not saying this isn't good clean code, I'm just thinking it might be
> possible to simplify it, and if so what the down side of simplifying it is.
> Does the abstraction layer make the code smaller, or make it easier to
> understand what it's doing? Or is this preparation for future changes we
> don't actually plan to make, and which would be only slightly more difficult
> without these preparations? (You can always refactor code to prepare for
> what you're about to do with it...)
>
AFAIK, for a little I see about lzma and 7zip it could manage all
compression algorithms (in theory)... so ti should be used to manage the
others that BB have too (in future).
Even if I am wrong I suggest you to do not breaks API consistency but
at least commets out the rc_free and replace with smaller code warning
future developers what/why you have done. I hope this helps.
Cheers,
--
Roberto A. Foglietta
http://www.roberto.foglietta.name
SkypeNick: robang74
ICQ#: 108718257
More information about the busybox
mailing list