Boost logo

Boost Users :

From: Eames, Andrew (andrew_at_[hidden])
Date: 2008-01-04 08:49:45


But there is still the problem with running off the end of the source -
If the source is not a multiple of 3 bytes then the input iterator will
run off the end of the input sequence which can cause an error.

  Andrew

 

From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Robert Ramey
Sent: Thursday, January 03, 2008 6:47 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] base 64 encoding

 

I had to separately record the number of bytes. Then when I decode,
just pull off that number of bytes.

 

Robert Ramey

 

        "Eames, Andrew" <andrew_at_[hidden]> wrote in message
news:8F37BF6F420455468C4BD57DD6BE199004C613F8_at_cobra.pc.cognex.com...

        Hi,

        I'm trying to encode base64 data by composing base64_from_binary
with transform_width but this doesn't appear to work correctly when the
data is not a multiple of 3 long. What is the correct way to handle this
- do I have to handle the padding myself by extending the input data and
then patching the tail of the result?

           Thanks

               Andrew

         

        
________________________________

        _______________________________________________
        Boost-users mailing list
        Boost-users_at_[hidden]
        http://lists.boost.org/mailman/listinfo.cgi/boost-users

________________________________

NOTE: This message was trained as non-spam. If this is wrong, please
correct the training as soon as possible.
Spam
<http://mail-gw.cognex.com/canit/b.php?c=s&i=10558474&m=f64580755fd2>
Not spam
<http://mail-gw.cognex.com/canit/b.php?c=n&i=10558474&m=f64580755fd2>
Forget previous vote
<http://mail-gw.cognex.com/canit/b.php?c=f&i=10558474&m=f64580755fd2>



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