help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Re: base64 en/decoding helper


From: Joachim Jaeckel
Subject: Re: [Help-smalltalk] Re: base64 en/decoding helper
Date: Fri, 26 Jun 2009 21:19:04 +0200
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)

Some quick reflex actions on the above part:

If the string size does not change, put it into a temporary variable.

j already shows if you got three characters, no need to ask tripple
(triplet?) for it's size.

Yes, that's right!

iterate over "aString , '\0\0\0'", you'll get your padding at the end
for free without extra checks

Sorry, but I didn't get that... do you mean to initialize 'tripple' with '\0\0\0'?

You're repeatedly grabbing triplets from the string and are looking
every time if you really got three characters, right?

Yes, because the last one could end with less...

But I see some potential for improvement...

Thanks! :-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]