On Aug 2, 8:24 pm, "Karl Malbrain" <malbr...@yahoo.comwrote:
"Richard Urich" <RichardUr...@gmail.comwrote in message
valid implementation). If the base64 string is not wasting 2 bits (for
an 8 bit char) of each element, then signed is potentially lossy.
Base 64 = 2^6 -- that's 2 bits less then 256 valued 2^8. No loss.
This is why I stated "If the base64 string is not wasting 2 bits (for
an 8 bit char) of each element...". Perhaps you will find the
following less confusing: If the base64 string is a buffer of 6-bit
values concatenated with no "empty" or "wasted" bits in between each 6-
bit value...
Perhaps you may also think of this as a "bit-packed" buffer or
something.
I read the OP to mean a buffer of 6-bit values, and attempted to
outline my assumption that it was a buffer of 6-bit values rather than
a buffer of 6-bit values stored in 8-bit elements, even later stating
I assumed 8 numbers were being stored in only 6 elements.
My experience with base64 encoding involves such buffers, generally
because a very bandwidth-limited I/O device is being sent the buffer.
I also explained there is no risk in casting if the only valid values
for each "unsigned char" he was receiving was within 0 to +127.
I (perhaps incorrectly) felt all of this extra explanation and
background was completely off-topic and useless to post.
Richard