bug-gnulib
[Top][All Lists]
Advanced

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

[bug-gnulib] Re: base64


From: Simon Josefsson
Subject: [bug-gnulib] Re: base64
Date: Thu, 25 Nov 2004 16:22:13 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Stepan Kasal <address@hidden> writes:

>> What advantage does this have over
>> 
>> #define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4)
>> 
>> The latter seems simpler to me.
>
> I meant to show the structure of the formula.

Ah, that's useful.  It now reads:

/* This uses that the expression (n+(k-1))/k means the smallest
   integer >= n/k, i.e., the ceiling of n/k.  */
#define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4)

Thanks.





reply via email to

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