[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] httpd: code shrink
From: Xabier Oneca -- xOneca <xoneca () gmail ! com>
Date: 2020-10-06 18:35:44
Message-ID: CACkgH72+1OajmS=8aRRQ5BvKPYb=EOrX2BM-NSAN=hjKrfffgQ () mail ! gmail ! com
[Download RAW message or body]
Hi Bruno,
> If I understand correctly:
>
> decode_base64() from uuencode.c = bigger one
> decodeBase64(char *Data) from httpd.c = smaller one
You understood it right. :)
> Assuming they are equivalent (I didn't check), wouldn't it make more sense to:
> a. Do the check in uuencode.c to see if httpd.c is used and call the httpd one \
> (smaller of the two) in the uudecode/base64 applets?
They are not the same. httpd's decodeBase64() does not have to deal
with NULL bytes. Any NULL byte will be treated as the end of the
decoded string.
> b. Line up the uuencode.c one with the httpd version to become smaller and call \
> that one for all decode64 purposes (removing the httpd specific one)?
The one from uudecode seems to be optimized to share most of the code
for uu-decode and base64-decode. I haven't looked at it hard enough,
but as a first approach, I didn't want to touch much code. Probably
there's room for more optimization here.
Thanks,
Xabier Oneca_,,_
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic