Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2007-04-14 00:50:47


Here is the problem:

Suppose you have 1 byte - that's 8 bits. Now you encode that into
3 bit octet + 3 bit octet + 2 bits. The last is extended to a byte so you
have a 3 byte "file".

now you translate back into inary. Your "file" has 3 bytes. Each
byte is translated backinto binary as 3 bits + 3 bits + 3 bits - 9 bits
which turns out to be 2 bytes.

So our original bitstream has been extended from 8 bits to 16.

In the serialization library
I record first the total number of bytes and and send that first. The
iterator "stack" I use to translate is terminated by a count rather than
some special "end" iterator.

To me this problem is inherent in the base 64 encoding scheme
as I understand it.

Robert Ramey

Jeffrey wrote:
> Hello.
>
> I am seeing the same problems. base64 encoding works for some
> input and not others.
>
>
> Does anyone know if this is fixed in RC 1_34_0 or cvs head?
>
> Thanks,


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net