Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2004-10-20 11:17:00


When I wrote the code for encoding/decoding base64 I didn't include the
trailing "=" required by the standard defnition of base64. This was for a
couple of reasons:

a) My de-serialization code didn't require the existence of "=" padding
characters
b) I didn't anticipate that the base64 text would be used by applications
other than serialization
c) I was short of time and had lots of other things to do.

We'll take a look at this for 1.33.

Robert Ramey

"Russell Hind" <rh_gmane_at_[hidden]> wrote in message
news:cl5t29$fme$1_at_sea.gmane.org...
> Ok, looking at the spec from http://www.faqs.org/rfcs/rfc1521.html
> section 5.2, = is only needed when the data doesn't end on a
> four-character boundary, and is used to pad it to a four-character
boundary.
>
> Does the encoding in serialize do this? (the data stream we had was
> long, so not sure exactly how many characters were in it as the XML file
> is hard to calculate this due to line breaks etc).
>
> When adding a single '=' to our data sent, the pythong decoding routine
> decoded it correctly which implies one character padding was necessary
> for our data and it doesn't look to have been added by serialize.
>
> Thanks
>
> Russell
>
> Russell Hind wrote:
> > Hi,
> >
> > I'm writing some binary data to an xml_oarchive (a vector of floats).
> >
> > I'm then giving the xml files to some python uses we have here so they
> > can read them in. They had trouble with the base64 encoding of the
> > binary data.
> >
> > One has mentioned that base64 spec says an '=' must be appended to the
> > data to indicate the padding up to the next 4-byte multiple.
> >
> > When they added an '=' to the data between the tags in the resultant xml
> > file, they could decode it successfully.
> >
> > If it is in the spec (am trying to find a link to check this), can the
> > the base64 encoding in serialize be modified to do this before the
> > 1.32.0 release, so it conforms to the standard?
> >
> > Thanks
> >
> > Russell
> >
> > _______________________________________________
> > Unsubscribe & other changes:
> > http://lists.boost.org/mailman/listinfo.cgi/boost
> >
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk